Harald Welte | 30afef3 | 2015-08-30 12:28:29 +0200 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Harald Welte | 27f9c4a | 2015-08-30 22:47:18 +0200 | [diff] [blame] | 3 | #include <unistd.h> |
Harald Welte | 30afef3 | 2015-08-30 12:28:29 +0200 | [diff] [blame] | 4 | |
Harald Welte | 27f9c4a | 2015-08-30 22:47:18 +0200 | [diff] [blame] | 5 | #include "BIT_STRING.h" |
| 6 | #include "OCTET_STRING.h" |
Harald Welte | 30afef3 | 2015-08-30 12:28:29 +0200 | [diff] [blame] | 7 | |
Daniel Willmann | b2548fb | 2015-11-30 16:24:57 +0100 | [diff] [blame] | 8 | void asn1_u32_to_bitstring(BIT_STRING_t *bitstr, uint32_t *buf, uint32_t in); |
| 9 | void asn1_u24_to_bitstring(BIT_STRING_t *bitstr, uint32_t *buf, uint32_t in); |
Daniel Willmann | f3685c2 | 2015-12-07 17:18:56 +0100 | [diff] [blame^] | 10 | void asn1_u16_to_str(OCTET_STRING_t *str, uint16_t *buf, uint16_t in); |
| 11 | void asn1_u8_to_str(OCTET_STRING_t *str, uint8_t *buf, uint8_t in); |
Harald Welte | 27f9c4a | 2015-08-30 22:47:18 +0200 | [diff] [blame] | 12 | int asn1_strncpy(char *out, const OCTET_STRING_t *in, size_t n); |
| 13 | uint16_t asn1str_to_u16(const OCTET_STRING_t *in); |
| 14 | uint8_t asn1str_to_u8(const OCTET_STRING_t *in); |
| 15 | uint32_t asn1bitstr_to_u32(const BIT_STRING_t *in); |