diff options
author | Lev Walkin <vlm@lionet.info> | 2005-11-26 11:25:14 +0000 |
---|---|---|
committer | Lev Walkin <vlm@lionet.info> | 2005-11-26 11:25:14 +0000 |
commit | 59b176ee355b3e82e6a8649b164c187c7a17a28f (patch) | |
tree | 6d864f02cd16eb75f4ae6e40199d1879d8363152 /skeletons/asn_codecs.h | |
parent | 708530582f5ba965fb596c3e189eec23c52337d9 (diff) |
upgrade: PER related changes
Diffstat (limited to 'skeletons/asn_codecs.h')
-rw-r--r-- | skeletons/asn_codecs.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/skeletons/asn_codecs.h b/skeletons/asn_codecs.h index 9250adab..f25a7975 100644 --- a/skeletons/asn_codecs.h +++ b/skeletons/asn_codecs.h @@ -1,5 +1,6 @@ /*- - * Copyright (c) 2003, 2004 Lev Walkin <vlm@lionet.info>. All rights reserved. + * Copyright (c) 2003, 2004, 2005 Lev Walkin <vlm@lionet.info>. + * All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef _ASN_CODECS_H_ @@ -61,6 +62,11 @@ typedef struct asn_enc_rval_s { tmp_error.structure_ptr = sptr; \ return tmp_error; \ } while(0) +#define _ASN_ENCODED_OK(rval) do { \ + rval.structure_ptr = 0; \ + rval.failed_type = 0; \ + return rval; \ +} while(0) /* * Type of the return value of the decoding functions (ber_decode, xer_decode) @@ -79,6 +85,12 @@ typedef struct asn_dec_rval_s { enum asn_dec_rval_code_e code; /* Result code */ size_t consumed; /* Number of bytes consumed */ } asn_dec_rval_t; +#define _ASN_DECODE_FAILED do { \ + asn_dec_rval_t tmp_error; \ + tmp_error.code = RC_FAIL; \ + tmp_error.consumed = 0; \ + return tmp_error; \ +} while(0) #ifdef __cplusplus } |