For internal use only.
brief Implementation of sockaddr_ptoa().
This file contains the implementation of the sockaddr_ptoa() function.
Definition in file sockaddr_ptoa.c.
#include "event_int.h"
#include <string.h>
Include dependency graph for sockaddr_ptoa.c:
Go to the source code of this file.
Data Structures | |
struct | partaddr |
Parse state. More... | |
Defines | |
#define | VALMASK |
Mask to retrieve character value. | |
#define | DIGIT |
Character is a digit. | |
#define | XDIGIT |
Character is a hexadecimal digit. | |
#define | COLON |
Character is a colon. | |
#define | PERIOD |
Character is a period. | |
#define | TYPEMASK |
Character type mask. | |
#define | ctype(c) |
Obtain character type. | |
#define | cval(c) |
Obtain character value. | |
#define | _bcd(num, digit) |
Obtain specified digit. | |
#define | bcd(num) |
Convert a BCD number to an ordinary integer. | |
#define | bcd_isquad(num) |
Test a BCD number for IPv4 quad constraints. | |
#define | hex_accum(accum, c) |
Add another digit to a hexadecimal (or BCD) number. | |
#define | dec_accum(accum, c) |
Add another digit to a decimal number. | |
#define | partaddr_init(pa, res) |
Initialize a struct partaddr. | |
#define | accumulate(pa, accum) |
Accumulate an address part. | |
#define | test_v6(pa) |
Test if an address is a fully specified IPv6 address. | |
Functions | |
ev_err_t | sockaddr_ptoa (ev_sockaddr_t *sa, const char *address, int alen) |
Fill an ev_sockaddr_t from a presentation format. | |
Variables | |
static unsigned char | cmap [] |
Mapping of characters to type and value. |
|
For internal use only. This macro retrieves the specified digit--counting from zero--of a hexadecimal or binary-coded-decimal number.
Definition at line 158 of file sockaddr_ptoa.c. |
|
For internal use only. This macro accumulates a given value onto a partial address in a struct partaddr.
Definition at line 283 of file sockaddr_ptoa.c. Referenced by sockaddr_ptoa(). |
|
For internal use only.
This macro takes the
Definition at line 173 of file sockaddr_ptoa.c. Referenced by sockaddr_ptoa(). |
|
For internal use only.
This macro tests the
Definition at line 191 of file sockaddr_ptoa.c. Referenced by sockaddr_ptoa(). |
|
For internal use only. This type value, when set in the cmap character map entry for a character, indicates that the character plays the part of the colon in an IPv6 address. Definition at line 69 of file sockaddr_ptoa.c. Referenced by sockaddr_ptoa(). |
|
For internal use only.
This macro retrieves the type of the character
Definition at line 103 of file sockaddr_ptoa.c. Referenced by sockaddr_ptoa(). |
|
For internal use only. This macro retrieves the value of the given decimal or hexadecimal character.
Definition at line 116 of file sockaddr_ptoa.c. |
|
For internal use only.
This macro is used to add another digit to the
Definition at line 232 of file sockaddr_ptoa.c. Referenced by sockaddr_ptoa(). |
|
For internal use only. This type value, when set in the cmap character map entry for a character, indicates that the character is a decimal (or hexadecimal) digit. The value may be obtained by ANDing the cmap entry with VALMASK. Definition at line 50 of file sockaddr_ptoa.c. Referenced by sockaddr_ptoa(). |
|
For internal use only.
This macro is used to add another digit to the
Definition at line 212 of file sockaddr_ptoa.c. Referenced by sockaddr_ptoa(). |
|
For internal use only.
This macro initializes
Definition at line 260 of file sockaddr_ptoa.c. Referenced by sockaddr_ptoa(). |
|
For internal use only. This type value, when set in the cmap character map entry for a character, indicates that the character plays the part of the period in an IPv4 address, or plays the part of the port separator character. Definition at line 79 of file sockaddr_ptoa.c. Referenced by sockaddr_ptoa(). |
|
For internal use only. This macro will check to see if an address is a fully specified IPv6 address, returning an error to the function caller if it is not.
Definition at line 305 of file sockaddr_ptoa.c. Referenced by sockaddr_ptoa(). |
|
For internal use only. This mask may be ANDed with the cmap character map entry to obtain the character type. Definition at line 87 of file sockaddr_ptoa.c. |
|
For internal use only. This mask may be ANDed with the value associated with a character in cmap in order to obtain the value of that character--for conversion of decimal and hexadecimal numbers. Definition at line 40 of file sockaddr_ptoa.c. |
|
For internal use only. This type value, when set in the cmap character map entry for a character, indicates that the character is a alphabetic hexadecimal digit (i.e., a-fA-F). The value may be obtained by ANDing the cmap entry with VALMASK. Definition at line 60 of file sockaddr_ptoa.c. Referenced by sockaddr_ptoa(). |
|
For internal use only. This variable maps character values to character type and value. Definition at line 123 of file sockaddr_ptoa.c. |