asn1c/skeletons/INTEGER.h

35 lines
1007 B
C
Raw Normal View History

2004-06-03 03:38:44 +00:00
/*-
* Copyright (c) 2003 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
#ifndef _INTEGER_H_
#define _INTEGER_H_
2004-09-24 21:00:50 +00:00
#include <asn_application.h>
2004-10-21 11:21:25 +00:00
#include <asn_codecs_prim.h>
2004-06-03 03:38:44 +00:00
typedef ASN__PRIMITIVE_TYPE_t INTEGER_t;
2004-06-03 03:38:44 +00:00
2004-09-29 13:26:15 +00:00
extern asn_TYPE_descriptor_t asn_DEF_INTEGER;
2004-06-03 03:38:44 +00:00
2004-09-22 16:06:28 +00:00
asn_struct_print_f INTEGER_print;
2004-06-03 03:38:44 +00:00
ber_type_decoder_f INTEGER_decode_ber;
der_type_encoder_f INTEGER_encode_der;
2004-10-21 11:21:25 +00:00
xer_type_decoder_f INTEGER_decode_xer;
2004-09-22 16:06:28 +00:00
xer_type_encoder_f INTEGER_encode_xer;
2004-06-03 03:38:44 +00:00
/***********************************
* Some handy conversion routines. *
***********************************/
/*
* Returns 0 if it was possible to convert, -1 otherwise.
* -1/EINVAL: Mandatory argument missing
* -1/ERANGE: Value encoded is out of range for long representation
2004-10-21 11:21:25 +00:00
* -1/ENOMEM: Memory allocation failed (in asn_long2INTEGER()).
2004-06-03 03:38:44 +00:00
*/
2004-09-29 13:26:15 +00:00
int asn_INTEGER2long(const INTEGER_t *i, long *l);
2004-10-21 11:21:25 +00:00
int asn_long2INTEGER(INTEGER_t *i, long l);
2004-06-03 03:38:44 +00:00
#endif /* _INTEGER_H_ */