Function SILC_ASN1_ANY
SYNOPSIS
Encoding:
SILC_ASN1_ANY(buffer)
SILC_ASN1_ANY_T(opts, tag, buffer)
Decoding:
SILC_ASN1_ANY(&buffer)
SILC_ASN1_ANY_T(opts, tag, buffer)
DESCRIPTION
Macro used to encode or decode another ASN.1 node. The buffer type
is SilcBuffer. This macro can be used for example to split large
tree into multiple nodes, and then decoding the nodes separately from
the buffers.
The `opts' is SilcAsn1Options. The `tag' is a tag number.
EXAMPLE
// Encode node of two boolean values
silc_asn1_encode(asn1, node,
SILC_ASN1_BOOLEAN(val1),
SILC_ASN1_BOOLEAN(val2),
SILC_ASN1_END);
// Encode tree with the node
silc_asn1_encode(asn1, tree,
SILC_ASN1_SEQUENCE_T(SILC_ASN1_PRIVATE, 101),
SILC_ASN1_ANY(node),
SILC_ASN1_BOOLEAN(boolval),
SILC_ASN1_END, SILC_ASN1_END);
|