diff options
Diffstat (limited to 'Source/charon/utils/identification.h')
-rw-r--r-- | Source/charon/utils/identification.h | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/Source/charon/utils/identification.h b/Source/charon/utils/identification.h index bc2889760..02a5a2e60 100644 --- a/Source/charon/utils/identification.h +++ b/Source/charon/utils/identification.h @@ -30,11 +30,14 @@ typedef enum id_type_t id_type_t; /** - * ID Types of a ID payload. + * @brief ID Types of a ID payload. + * + * @see identification_t * * @ingroup utils */ enum id_type_t { + /** * ID data is a single four (4) octet IPv4 address. */ @@ -79,6 +82,9 @@ enum id_type_t { ID_KEY_ID = 11 }; +/** + * string amppings for id_type_t + */ extern mapping_t id_type_m[]; typedef struct identification_t identification_t; @@ -87,14 +93,20 @@ typedef struct identification_t identification_t; * @brief Generic identification, such as used in ID payload. * * The following types are possible: - * * - ID_IPV4_ADDR - * - ID_FQDN (not implemented) - * - ID_RFC822_ADDR (not implemented) - * - ID_IPV6_ADDR (not implemented) - * - ID_DER_ASN1_DN (not implemented) - * - ID_DER_ASN1_GN (not implemented) - * - ID_KEY_ID (not implemented) + * - ID_FQDN* + * - ID_RFC822_ADDR* + * - ID_IPV6_ADDR* + * - ID_DER_ASN1_DN* + * - ID_DER_ASN1_GN* + * - ID_KEY_ID* + * (* = string conversion not supported) + * + * @b Constructors: + * - identification_create_from_string() + * - identification_create_from_encoding() + * + * @todo Implement other types. * * @ingroup utils */ @@ -134,7 +146,7 @@ struct identification_t { * * @param this the identification_t_object * @param other other identification_t_object - * @return string + * @return TRUE if the IDs are equal */ bool (*equals) (identification_t *this,identification_t *other); @@ -142,7 +154,7 @@ struct identification_t { /** * @brief Destroys a identification_t object. * - * @param this identification_t object + * @param this identification_t object */ void (*destroy) (identification_t *this); }; @@ -150,7 +162,7 @@ struct identification_t { /** * @brief Creates an identification_t object from a string. * - * @param type type of this id, such as ID_IPV4_ADDR or ID_RFC822_ADDR + * @param type type of this id, such as ID_IPV4_ADDR * @param string input string, which will be converted * @return * - created identification_t object, or @@ -164,7 +176,7 @@ identification_t * identification_create_from_string(id_type_t type, char *strin /** * @brief Creates an identification_t object from an encoded chunk. * - * @param type type of this id, such as ID_IPV4_ADDR or ID_RFC822_ADDR + * @param type type of this id, such as ID_IPV4_ADDR * @param encoded encoded bytes, such as from identification_t.get_encoding * @return created identification_t object * |