mirror of
https://github.com/open5gs/open5gs.git
synced 2026-05-05 23:37:22 +00:00
spec: S1AP/NGAP update to v16.4.0(2021-01-04)
This commit is contained in:
parent
61778f9142
commit
ada01fca8f
3130 changed files with 280188 additions and 91812 deletions
|
|
@ -41,88 +41,12 @@ typedef struct asn_bit_data_s asn_per_data_t;
|
|||
#define per_get_many_bits(data, dst, align, bits) \
|
||||
asn_get_many_bits(data, dst, align, bits)
|
||||
|
||||
/*
|
||||
* X.691 (08/2015) #11.9 "General rules for encoding a length determinant"
|
||||
* Get the length "n" from the Unaligned PER stream.
|
||||
*/
|
||||
ssize_t uper_get_length(asn_per_data_t *pd, int effective_bound_bits,
|
||||
size_t lower_bound, int *repeat);
|
||||
|
||||
ssize_t aper_get_length(asn_per_data_t *pd, int range,
|
||||
int effective_bound_bits, int *repeat);
|
||||
|
||||
/*
|
||||
* Get the normally small length "n".
|
||||
*/
|
||||
ssize_t uper_get_nslength(asn_per_data_t *pd);
|
||||
ssize_t aper_get_nslength(asn_per_data_t *pd);
|
||||
|
||||
/*
|
||||
* Get the normally small non-negative whole number.
|
||||
*/
|
||||
ssize_t uper_get_nsnnwn(asn_per_data_t *pd);
|
||||
ssize_t aper_get_nsnnwn(asn_per_data_t *pd, int range);
|
||||
|
||||
/* X.691-2008/11, #11.5.6 */
|
||||
int uper_get_constrained_whole_number(asn_per_data_t *pd, uintmax_t *v, int nbits);
|
||||
|
||||
|
||||
/* Temporary compatibility layer. Will get removed. */
|
||||
typedef struct asn_bit_outp_s asn_per_outp_t;
|
||||
#define per_put_few_bits(out, bits, obits) asn_put_few_bits(out, bits, obits)
|
||||
#define per_put_many_bits(out, src, nbits) asn_put_many_bits(out, src, nbits)
|
||||
#define per_put_aligned_flush(out) asn_put_aligned_flush(out)
|
||||
|
||||
|
||||
/*
|
||||
* Rebase the given value as an offset into the range specified by the
|
||||
* lower bound (lb) and upper bound (ub).
|
||||
* RETURN VALUES:
|
||||
* -1: Conversion failed due to range problems.
|
||||
* 0: Conversion was successful.
|
||||
*/
|
||||
int per_long_range_rebase(long, intmax_t lb, intmax_t ub, unsigned long *output);
|
||||
int per_imax_range_rebase(intmax_t v, intmax_t lb, intmax_t ub, uintmax_t *output);
|
||||
/* The inverse operation: restores the value by the offset and its bounds. */
|
||||
int per_long_range_unrebase(unsigned long inp, intmax_t lb, intmax_t ub, long *outp);
|
||||
int per_imax_range_unrebase(uintmax_t inp, intmax_t lb, intmax_t ub, intmax_t *outp);
|
||||
|
||||
/* X.691-2008/11, #11.5 */
|
||||
int uper_put_constrained_whole_number_u(asn_per_outp_t *po, unsigned long v, int nbits);
|
||||
|
||||
/*
|
||||
* X.691 (08/2015) #11.9 "General rules for encoding a length determinant"
|
||||
* Put the length "whole_length" to the Unaligned PER stream.
|
||||
* If (opt_need_eom) is given, it will be set to 1 if final 0-length is needed.
|
||||
* In that case, invoke uper_put_length(po, 0, 0) after encoding the last block.
|
||||
* This function returns the number of units which may be flushed
|
||||
* in the next units saving iteration.
|
||||
*/
|
||||
ssize_t uper_put_length(asn_per_outp_t *po, size_t whole_length,
|
||||
int *opt_need_eom);
|
||||
|
||||
ssize_t aper_put_length(asn_per_outp_t *po, int range, size_t length,
|
||||
int *opt_need_eom);
|
||||
|
||||
/* Align the current bit position to octet bundary */
|
||||
int aper_put_align(asn_per_outp_t *po);
|
||||
int32_t aper_get_align(asn_per_data_t *pd);
|
||||
|
||||
/*
|
||||
* Put the normally small length "n" to the Unaligned PER stream.
|
||||
* Returns 0 or -1.
|
||||
*/
|
||||
int uper_put_nslength(asn_per_outp_t *po, size_t length);
|
||||
|
||||
int aper_put_nslength(asn_per_outp_t *po, size_t length);
|
||||
|
||||
/*
|
||||
* Put the normally small non-negative whole number.
|
||||
*/
|
||||
int uper_put_nsnnwn(asn_per_outp_t *po, int n);
|
||||
|
||||
int aper_put_nsnnwn(asn_per_outp_t *po, int range, int number);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue