blob: b42321b49ad0b92535633bea0490da12b6de29ef [file] [log] [blame]
Lev Walkinf15320b2004-06-03 03:38:44 +00001/*-
2 * Copyright (c) 2003 Lev Walkin <vlm@lionet.info>. All rights reserved.
3 * Redistribution and modifications are permitted subject to BSD license.
4 */
5#ifndef _INTEGER_H_
6#define _INTEGER_H_
7
Lev Walkin11c3e172004-09-24 21:00:50 +00008#include <asn_application.h>
Lev Walkin8e8078a2004-09-26 13:10:40 +00009#include <ber_codec_prim.h>
Lev Walkinf15320b2004-06-03 03:38:44 +000010
Lev Walkin8e8078a2004-09-26 13:10:40 +000011typedef ASN__PRIMITIVE_TYPE_t INTEGER_t;
Lev Walkinf15320b2004-06-03 03:38:44 +000012
13extern asn1_TYPE_descriptor_t asn1_DEF_INTEGER;
14
Lev Walkina9cc46e2004-09-22 16:06:28 +000015asn_struct_print_f INTEGER_print;
Lev Walkinf15320b2004-06-03 03:38:44 +000016ber_type_decoder_f INTEGER_decode_ber;
17der_type_encoder_f INTEGER_encode_der;
Lev Walkina9cc46e2004-09-22 16:06:28 +000018xer_type_encoder_f INTEGER_encode_xer;
Lev Walkinf15320b2004-06-03 03:38:44 +000019
20/***********************************
21 * Some handy conversion routines. *
22 ***********************************/
23
24/*
25 * Returns 0 if it was possible to convert, -1 otherwise.
26 * -1/EINVAL: Mandatory argument missing
27 * -1/ERANGE: Value encoded is out of range for long representation
28 */
29int asn1_INTEGER2long(const INTEGER_t *i, long *l);
30
31#endif /* _INTEGER_H_ */