libcoap  4.3.0beta
coap_asn1_internal.h
Go to the documentation of this file.
1 /*
2  * coap_asn1_internal.h -- ASN.1 functions for libcoap
3  *
4  * Copyright (C) 2020 Jon Shallow <supjps-libcoap@jpshallow.com>
5  *
6  * This file is part of the CoAP library libcoap. Please see README for terms
7  * of use.
8  */
9 
15 #ifndef COAP_ASN1_INTERNAL_H_
16 #define COAP_ASN1_INTERNAL_H_
17 
18 
26 typedef enum {
33 
44 typedef int (*asn1_validate)(const uint8_t *data, size_t size);
45 
55 size_t asn1_len(const uint8_t **ptr);
56 
68 coap_asn1_tag_t asn1_tag_c(const uint8_t **ptr, int *constructed, int *class);
69 
83  size_t tlen, asn1_validate validate);
84 
87 #endif /* COAP_ASN1_INTERNAL_H_ */
coap_asn1_tag_t asn1_tag_c(const uint8_t **ptr, int *constructed, int *class)
Get the asn1 tag from the current ptr.
Definition: coap_asn1.c:33
size_t asn1_len(const uint8_t **ptr)
Get the asn1 length from the current ptr.
Definition: coap_asn1.c:12
coap_asn1_tag_t
coap_binary_t * get_asn1_tag(coap_asn1_tag_t ltag, const uint8_t *ptr, size_t tlen, asn1_validate validate)
Get the asn1 tag and data from the current ptr.
Definition: coap_asn1.c:61
int(* asn1_validate)(const uint8_t *data, size_t size)
Callback to validate the asn1 tag and data.
@ COAP_ASN1_NONE
@ COAP_ASN1_OCTETSTRING
@ COAP_ASN1_INTEGER
@ COAP_ASN1_BITSTRING
@ COAP_ASN1_IDENTIFIER
CoAP binary data definition.
Definition: str.h:48
unsigned char uint8_t
Definition: uthash.h:79