diff options
author | sangsu <sangsu.choi@samsung.com> | 2016-06-08 10:20:15 +0900 |
---|---|---|
committer | sangsu <sangsu.choi@samsung.com> | 2016-06-08 10:20:49 +0900 |
commit | e5c912938e2958fbeb7ee01183f0bc4e33143ead (patch) | |
tree | 18100dcff05d11b0909fb22b86d5837f2bfc4e9d /doc/texi/structure.c.texi | |
parent | 74767631f4593cf64808cb4f510f765e7319ae47 (diff) | |
parent | a39386a3afe2d7e0cc717a49f970f53d974fda53 (diff) | |
download | libtasn1-accepted/tizen_ivi.tar.gz libtasn1-accepted/tizen_ivi.tar.bz2 libtasn1-accepted/tizen_ivi.zip |
Merge branch 'upstream' into tizentizen_4.0.m1_releasesubmit/tizen_unified/20170308.100414submit/tizen_3.0_wearable/20161015.000003submit/tizen_3.0_tv/20161015.000003submit/tizen_3.0_mobile/20161015.000004submit/tizen_3.0_ivi/20161010.000004submit/tizen_3.0_common/20161104.104000submit/tizen_3.0.m2/20170104.093753submit/tizen/20160613.080449accepted/tizen/wearable/20160614.041230accepted/tizen/unified/20170309.035942accepted/tizen/tv/20160614.041238accepted/tizen/mobile/20160614.041226accepted/tizen/ivi/20160614.041245accepted/tizen/common/20160614.143706accepted/tizen/3.0/wearable/20161015.083140accepted/tizen/3.0/tv/20161016.004829accepted/tizen/3.0/mobile/20161015.033615accepted/tizen/3.0/ivi/20161011.050502accepted/tizen/3.0/common/20161114.111043accepted/tizen/3.0.m2/wearable/20170105.025000accepted/tizen/3.0.m2/tv/20170105.024831accepted/tizen/3.0.m2/mobile/20170105.024646tizen_3.0_tvtizen_3.0.m2accepted/tizen_wearableaccepted/tizen_tvaccepted/tizen_mobileaccepted/tizen_iviaccepted/tizen_commonaccepted/tizen_3.0.m2_wearableaccepted/tizen_3.0.m2_tvaccepted/tizen_3.0.m2_mobile
Change-Id: I6a83621b105d4c428d1df8e52499b53185577419
Signed-off-by: sangsu <sangsu.choi@samsung.com>
Diffstat (limited to 'doc/texi/structure.c.texi')
-rw-r--r-- | doc/texi/structure.c.texi | 156 |
1 files changed, 156 insertions, 0 deletions
diff --git a/doc/texi/structure.c.texi b/doc/texi/structure.c.texi new file mode 100644 index 0000000..fd3f6c8 --- /dev/null +++ b/doc/texi/structure.c.texi @@ -0,0 +1,156 @@ +@subheading asn1_array2tree +@anchor{asn1_array2tree} +@deftypefun {int} {asn1_array2tree} (const asn1_static_node * @var{array}, asn1_node * @var{definitions}, char * @var{errorDescription}) +@var{array}: specify the array that contains ASN.1 declarations + +@var{definitions}: return the pointer to the structure created by +*ARRAY ASN.1 declarations + +@var{errorDescription}: return the error description. + +Creates the structures needed to manage the ASN.1 definitions. + @code{array} is a vector created by @code{asn1_parser2array()} . + +@strong{Returns:} @code{ASN1_SUCCESS} if structure was created correctly, +@code{ASN1_ELEMENT_NOT_EMPTY} if * @code{definitions} not NULL, +@code{ASN1_IDENTIFIER_NOT_FOUND} if in the file there is an identifier +that is not defined (see @code{errorDescription} for more information), +@code{ASN1_ARRAY_ERROR} if the array pointed by @code{array} is wrong. +@end deftypefun + +@subheading asn1_delete_structure +@anchor{asn1_delete_structure} +@deftypefun {int} {asn1_delete_structure} (asn1_node * @var{structure}) +@var{structure}: pointer to the structure that you want to delete. + +Deletes the structure * @code{structure} . At the end, * @code{structure} is set +to NULL. + +@strong{Returns:} @code{ASN1_SUCCESS} if successful, @code{ASN1_ELEMENT_NOT_FOUND} if +* @code{structure} was NULL. +@end deftypefun + +@subheading asn1_delete_structure2 +@anchor{asn1_delete_structure2} +@deftypefun {int} {asn1_delete_structure2} (asn1_node * @var{structure}, unsigned int @var{flags}) +@var{structure}: pointer to the structure that you want to delete. + +@var{flags}: additional flags (see @code{ASN1_DELETE_FLAG} ) + +Deletes the structure * @code{structure} . At the end, * @code{structure} is set +to NULL. + +@strong{Returns:} @code{ASN1_SUCCESS} if successful, @code{ASN1_ELEMENT_NOT_FOUND} if +* @code{structure} was NULL. +@end deftypefun + +@subheading asn1_delete_element +@anchor{asn1_delete_element} +@deftypefun {int} {asn1_delete_element} (asn1_node @var{structure}, const char * @var{element_name}) +@var{structure}: pointer to the structure that contains the element you +want to delete. + +@var{element_name}: element's name you want to delete. + +Deletes the element named * @code{element_name} inside * @code{structure} . + +@strong{Returns:} @code{ASN1_SUCCESS} if successful, @code{ASN1_ELEMENT_NOT_FOUND} if +the @code{element_name} was not found. +@end deftypefun + +@subheading asn1_create_element +@anchor{asn1_create_element} +@deftypefun {int} {asn1_create_element} (asn1_node @var{definitions}, const char * @var{source_name}, asn1_node * @var{element}) +@var{definitions}: pointer to the structure returned by "parser_asn1" function + +@var{source_name}: the name of the type of the new structure (must be +inside p_structure). + +@var{element}: pointer to the structure created. + +Creates a structure of type @code{source_name} . Example using +"pkix.asn": + +rc = asn1_create_element(cert_def, "PKIX1.Certificate", certptr); + +@strong{Returns:} @code{ASN1_SUCCESS} if creation OK, @code{ASN1_ELEMENT_NOT_FOUND} if + @code{source_name} is not known. +@end deftypefun + +@subheading asn1_print_structure +@anchor{asn1_print_structure} +@deftypefun {void} {asn1_print_structure} (FILE * @var{out}, asn1_node @var{structure}, const char * @var{name}, int @var{mode}) +@var{out}: pointer to the output file (e.g. stdout). + +@var{structure}: pointer to the structure that you want to visit. + +@var{name}: an element of the structure + +@var{mode}: specify how much of the structure to print, can be +@code{ASN1_PRINT_NAME} , @code{ASN1_PRINT_NAME_TYPE} , +@code{ASN1_PRINT_NAME_TYPE_VALUE} , or @code{ASN1_PRINT_ALL} . + +Prints on the @code{out} file descriptor the structure's tree starting +from the @code{name} element inside the structure @code{structure} . +@end deftypefun + +@subheading asn1_number_of_elements +@anchor{asn1_number_of_elements} +@deftypefun {int} {asn1_number_of_elements} (asn1_node @var{element}, const char * @var{name}, int * @var{num}) +@var{element}: pointer to the root of an ASN1 structure. + +@var{name}: the name of a sub-structure of ROOT. + +@var{num}: pointer to an integer where the result will be stored + +Counts the number of elements of a sub-structure called NAME with +names equal to "?1","?2", ... + +@strong{Returns:} @code{ASN1_SUCCESS} if successful, @code{ASN1_ELEMENT_NOT_FOUND} if + @code{name} is not known, @code{ASN1_GENERIC_ERROR} if pointer @code{num} is @code{NULL} . +@end deftypefun + +@subheading asn1_find_structure_from_oid +@anchor{asn1_find_structure_from_oid} +@deftypefun {const char *} {asn1_find_structure_from_oid} (asn1_node @var{definitions}, const char * @var{oidValue}) +@var{definitions}: ASN1 definitions + +@var{oidValue}: value of the OID to search (e.g. "1.2.3.4"). + +Search the structure that is defined just after an OID definition. + +@strong{Returns:} @code{NULL} when @code{oidValue} not found, otherwise the pointer to a +constant string that contains the element name defined just after +the OID. +@end deftypefun + +@subheading asn1_copy_node +@anchor{asn1_copy_node} +@deftypefun {int} {asn1_copy_node} (asn1_node @var{dst}, const char * @var{dst_name}, asn1_node @var{src}, const char * @var{src_name}) +@var{dst}: Destination asn1 node. + +@var{dst_name}: Field name in destination node. + +@var{src}: Source asn1 node. + +@var{src_name}: Field name in source node. + +Create a deep copy of a asn1_node variable. That +function requires @code{dst} to be expanded using @code{asn1_create_element()} . + +@strong{Returns:} Return @code{ASN1_SUCCESS} on success. +@end deftypefun + +@subheading asn1_dup_node +@anchor{asn1_dup_node} +@deftypefun {asn1_node} {asn1_dup_node} (asn1_node @var{src}, const char * @var{src_name}) +@var{src}: Source asn1 node. + +@var{src_name}: Field name in source node. + +Create a deep copy of a asn1_node variable. This function +will return an exact copy of the provided structure. + +@strong{Returns:} Return @code{NULL} on failure. +@end deftypefun + |