libidn: profiles.c File Reference

libidn 1.41

Macros | Variables
profiles.c File Reference
`#include <config.h>`
`#include "stringprep.h"`
`#include "rfc3454.h"`

Go to the source code of this file.

## Macros
#define | countof(a) (sizeof(a)/sizeof(*(a)))
#define | TABLE(x) stringprep_rfc3454_##x, N_STRINGPREP_rfc3454_##x

## Variables
const Stringprep_profiles | stringprep_profiles []
const Stringprep_profile | stringprep_nameprep []
const Stringprep_profile | stringprep_kerberos5 []
const Stringprep_table_element | stringprep_xmpp_nodeprep_prohibit []
const Stringprep_profile | stringprep_xmpp_nodeprep []
const Stringprep_profile | stringprep_xmpp_resourceprep []
const Stringprep_profile | stringprep_plain []
const Stringprep_profile | stringprep_trace []
const Stringprep_table_element | stringprep_iscsi_prohibit []
const Stringprep_profile | stringprep_iscsi []
const Stringprep_table_element | stringprep_saslprep_space_map []
const Stringprep_profile | stringprep_saslprep []

## Macro Definition Documentation

## ◆ countof

#define countof | ( |  | a | ) | (sizeof(a)/sizeof(*(a)))

Definition at line 48 of file profiles.c.

## ◆ TABLE

#define TABLE | ( |  | x | ) | stringprep_rfc3454_##x, N_STRINGPREP_rfc3454_##x

Definition at line 51 of file profiles.c.

## Variable Documentation

## ◆ stringprep_iscsi

const Stringprep_profile stringprep_iscsi[]

Initial value:
= {
{STRINGPREP_MAP_TABLE, 0, TABLE (B_1)},
{STRINGPREP_MAP_TABLE, 0, TABLE (B_2)},
{STRINGPREP_NFKC, 0, 0, 0},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_1_1)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_1_2)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_2_1)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_2_2)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_3)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_4)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_5)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_6)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_7)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_8)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_9)},
{STRINGPREP_PROHIBIT_TABLE, 0, stringprep_iscsi_prohibit,
countof (stringprep_iscsi_prohibit) - 1},
{STRINGPREP_BIDI, 0, 0, 0},
{STRINGPREP_BIDI_PROHIBIT_TABLE, 0, TABLE (C_8)},
{STRINGPREP_BIDI_RAL_TABLE, ~STRINGPREP_NO_BIDI, TABLE (D_1)},
{STRINGPREP_BIDI_L_TABLE, ~STRINGPREP_NO_BIDI, TABLE (D_2)},
{STRINGPREP_UNASSIGNED_TABLE, ~STRINGPREP_NO_UNASSIGNED, TABLE (A_1)},
{0}
}
countof
#define countof(a)
Definition: profiles.c:48
TABLE
#define TABLE(x)
Definition: profiles.c:51
stringprep_iscsi_prohibit
const Stringprep_table_element stringprep_iscsi_prohibit[]
Definition: profiles.c:187
STRINGPREP_BIDI_PROHIBIT_TABLE
@ STRINGPREP_BIDI_PROHIBIT_TABLE
Definition: stringprep.h:101
STRINGPREP_BIDI_RAL_TABLE
@ STRINGPREP_BIDI_RAL_TABLE
Definition: stringprep.h:102
STRINGPREP_NFKC
@ STRINGPREP_NFKC
Definition: stringprep.h:96
STRINGPREP_PROHIBIT_TABLE
@ STRINGPREP_PROHIBIT_TABLE
Definition: stringprep.h:100
STRINGPREP_UNASSIGNED_TABLE
@ STRINGPREP_UNASSIGNED_TABLE
Definition: stringprep.h:99
STRINGPREP_BIDI
@ STRINGPREP_BIDI
Definition: stringprep.h:97
STRINGPREP_MAP_TABLE
@ STRINGPREP_MAP_TABLE
Definition: stringprep.h:98
STRINGPREP_BIDI_L_TABLE
@ STRINGPREP_BIDI_L_TABLE
Definition: stringprep.h:103

Definition at line 197 of file profiles.c.

## ◆ stringprep_iscsi_prohibit

const Stringprep_table_element stringprep_iscsi_prohibit[]

Initial value:
= {
{0x0000, 0x002C},
{0x002F, 0x002F},
{0x003B, 0x0040},
{0x005B, 0x0060},
{0x007B, 0x007F},
{0x3002, 0x3002},
{0}
}

Definition at line 187 of file profiles.c.

## ◆ stringprep_kerberos5

const Stringprep_profile stringprep_kerberos5[]

Initial value:
= {
{STRINGPREP_MAP_TABLE, 0, TABLE (B_1)},
{STRINGPREP_MAP_TABLE, 0, TABLE (B_3)},
{STRINGPREP_NFKC, 0, 0, 0},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_1_2)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_2_2)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_3)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_4)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_5)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_6)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_7)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_8)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_9)},
{STRINGPREP_BIDI, 0, 0, 0},
{STRINGPREP_BIDI_PROHIBIT_TABLE, ~STRINGPREP_NO_BIDI, TABLE (C_8)},
{STRINGPREP_BIDI_RAL_TABLE, 0, TABLE (D_1)},
{STRINGPREP_BIDI_L_TABLE, 0, TABLE (D_2)},
{STRINGPREP_UNASSIGNED_TABLE, ~STRINGPREP_NO_UNASSIGNED, TABLE (A_1)},
{0}
}

Definition at line 74 of file profiles.c.

## ◆ stringprep_nameprep

const Stringprep_profile stringprep_nameprep[]

Initial value:
= {
{STRINGPREP_MAP_TABLE, 0, TABLE (B_1)},
{STRINGPREP_MAP_TABLE, 0, TABLE (B_2)},
{STRINGPREP_NFKC, 0, 0, 0},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_1_2)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_2_2)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_3)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_4)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_5)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_6)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_7)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_8)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_9)},
{STRINGPREP_BIDI, 0, 0, 0},
{STRINGPREP_BIDI_PROHIBIT_TABLE, ~STRINGPREP_NO_BIDI, TABLE (C_8)},
{STRINGPREP_BIDI_RAL_TABLE, 0, TABLE (D_1)},
{STRINGPREP_BIDI_L_TABLE, 0, TABLE (D_2)},
{STRINGPREP_UNASSIGNED_TABLE, ~STRINGPREP_NO_UNASSIGNED, TABLE (A_1)},
{0}
}

Definition at line 53 of file profiles.c.

## ◆ stringprep_plain

const Stringprep_profile stringprep_plain[]

Initial value:
= {
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_2_1)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_2_2)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_3)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_4)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_5)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_6)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_8)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_9)},
{STRINGPREP_BIDI, 0, 0, 0},
{STRINGPREP_BIDI_PROHIBIT_TABLE, 0, TABLE (C_8)},
{STRINGPREP_BIDI_RAL_TABLE, ~STRINGPREP_NO_BIDI, TABLE (D_1)},
{STRINGPREP_BIDI_L_TABLE, ~STRINGPREP_NO_BIDI, TABLE (D_2)},
{0}
}

Definition at line 155 of file profiles.c.

## ◆ stringprep_profiles

const Stringprep_profiles stringprep_profiles[]

Initial value:
= {
{"Nameprep", stringprep_nameprep},
{"KRBprep", stringprep_kerberos5},
{"Nodeprep", stringprep_xmpp_nodeprep},
{"Resourceprep", stringprep_xmpp_resourceprep},
{"plain", stringprep_plain},
{"trace", stringprep_trace},
{"SASLprep", stringprep_saslprep},
{"ISCSIprep", stringprep_iscsi},
{"iSCSI", stringprep_iscsi},
{NULL, NULL}
}
stringprep_kerberos5
const Stringprep_profile stringprep_kerberos5[]
Definition: profiles.c:74
stringprep_plain
const Stringprep_profile stringprep_plain[]
Definition: profiles.c:155
stringprep_saslprep
const Stringprep_profile stringprep_saslprep[]
Definition: profiles.c:243
stringprep_iscsi
const Stringprep_profile stringprep_iscsi[]
Definition: profiles.c:197
stringprep_xmpp_nodeprep
const Stringprep_profile stringprep_xmpp_nodeprep[]
Definition: profiles.c:109
stringprep_trace
const Stringprep_profile stringprep_trace[]
Definition: profiles.c:171
stringprep_nameprep
const Stringprep_profile stringprep_nameprep[]
Definition: profiles.c:53
stringprep_xmpp_resourceprep
const Stringprep_profile stringprep_xmpp_resourceprep[]
Definition: profiles.c:134

Definition at line 34 of file profiles.c.

## ◆ stringprep_saslprep

const Stringprep_profile stringprep_saslprep[]

Initial value:
= {
{STRINGPREP_MAP_TABLE, 0, stringprep_saslprep_space_map,
countof (stringprep_saslprep_space_map) - 1},
{STRINGPREP_MAP_TABLE, 0, TABLE (B_1)},
{STRINGPREP_NFKC, 0, 0, 0},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_1_2)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_2_1)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_2_2)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_3)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_4)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_5)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_6)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_7)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_8)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_9)},
{STRINGPREP_BIDI, 0, 0, 0},
{STRINGPREP_BIDI_PROHIBIT_TABLE, 0, TABLE (C_8)},
{STRINGPREP_BIDI_RAL_TABLE, ~STRINGPREP_NO_BIDI, TABLE (D_1)},
{STRINGPREP_BIDI_L_TABLE, ~STRINGPREP_NO_BIDI, TABLE (D_2)},
{STRINGPREP_UNASSIGNED_TABLE, ~STRINGPREP_NO_UNASSIGNED, TABLE (A_1)},
{0}
}
stringprep_saslprep_space_map
const Stringprep_table_element stringprep_saslprep_space_map[]
Definition: profiles.c:222

Definition at line 243 of file profiles.c.

## ◆ stringprep_saslprep_space_map

const Stringprep_table_element stringprep_saslprep_space_map[]

Initial value:
= {
{0x00A0, 0x00A0, {0x0020}},
{0x1680, 0x1680, {0x0020}},
{0x2000, 0x200B, {0x0020}},
{0x202F, 0x202F, {0x0020}},
{0x205F, 0x205F, {0x0020}},
{0x3000, 0x3000, {0x0020}},
{0}
}

Definition at line 222 of file profiles.c.

## ◆ stringprep_trace

const Stringprep_profile stringprep_trace[]

Initial value:
= {
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_2_1)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_2_2)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_3)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_4)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_5)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_6)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_8)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_9)},
{STRINGPREP_BIDI, 0, 0, 0},
{STRINGPREP_BIDI_PROHIBIT_TABLE, 0, TABLE (C_8)},
{STRINGPREP_BIDI_RAL_TABLE, ~STRINGPREP_NO_BIDI, TABLE (D_1)},
{STRINGPREP_BIDI_L_TABLE, ~STRINGPREP_NO_BIDI, TABLE (D_2)},
{0}
}

Definition at line 171 of file profiles.c.

## ◆ stringprep_xmpp_nodeprep

const Stringprep_profile stringprep_xmpp_nodeprep[]

Initial value:
= {
{STRINGPREP_MAP_TABLE, 0, TABLE (B_1)},
{STRINGPREP_MAP_TABLE, 0, TABLE (B_2)},
{STRINGPREP_NFKC, 0, 0, 0},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_1_1)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_1_2)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_2_1)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_2_2)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_3)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_4)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_5)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_6)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_7)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_8)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_9)},
{STRINGPREP_PROHIBIT_TABLE, 0, stringprep_xmpp_nodeprep_prohibit,
countof (stringprep_xmpp_nodeprep_prohibit) - 1},
{STRINGPREP_BIDI, 0, 0, 0},
{STRINGPREP_BIDI_PROHIBIT_TABLE, 0, TABLE (C_8)},
{STRINGPREP_BIDI_RAL_TABLE, 0, TABLE (D_1)},
{STRINGPREP_BIDI_L_TABLE, 0, TABLE (D_2)},
{STRINGPREP_UNASSIGNED_TABLE, ~STRINGPREP_NO_UNASSIGNED, TABLE (A_1)},
{0}
}
stringprep_xmpp_nodeprep_prohibit
const Stringprep_table_element stringprep_xmpp_nodeprep_prohibit[]
Definition: profiles.c:97

Definition at line 109 of file profiles.c.

## ◆ stringprep_xmpp_nodeprep_prohibit

const Stringprep_table_element stringprep_xmpp_nodeprep_prohibit[]

Initial value:
= {
{0x000022, 0x000022},
{0x000026, 0x000026},
{0x000027, 0x000027},
{0x00002F, 0x00002F},
{0x00003A, 0x00003A},
{0x00003C, 0x00003C},
{0x00003E, 0x00003E},
{0x000040, 0x000040},
{0}
}

Definition at line 97 of file profiles.c.

## ◆ stringprep_xmpp_resourceprep

const Stringprep_profile stringprep_xmpp_resourceprep[]

Initial value:
= {
{STRINGPREP_MAP_TABLE, 0, TABLE (B_1)},
{STRINGPREP_NFKC, 0, 0, 0},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_1_2)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_2_1)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_2_2)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_3)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_4)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_5)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_6)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_7)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_8)},
{STRINGPREP_PROHIBIT_TABLE, 0, TABLE (C_9)},
{STRINGPREP_BIDI, 0, 0, 0},
{STRINGPREP_BIDI_PROHIBIT_TABLE, 0, TABLE (C_8)},
{STRINGPREP_BIDI_RAL_TABLE, ~STRINGPREP_NO_BIDI, TABLE (D_1)},
{STRINGPREP_BIDI_L_TABLE, ~STRINGPREP_NO_BIDI, TABLE (D_2)},
{STRINGPREP_UNASSIGNED_TABLE, ~STRINGPREP_NO_UNASSIGNED, TABLE (A_1)},
{0}
}

Definition at line 134 of file profiles.c.