diff options
author | Harald Welte <laforge@gnumonks.org> | 2016-04-25 18:47:53 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2016-05-05 18:49:27 +0200 |
commit | 9709b2e6fd84cab48fc7844475518f68f937bb01 (patch) | |
tree | 5a59887667fd4045f73d8a61a1ad3bb41c7decd3 /include | |
parent | fbd02fa8ccb27472412189febcc22f77d83ba0ac (diff) |
Import osmo_{encode,decode}_big_endian() from openbsc
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/core/utils.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 27e1e188..dbc454f6 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -76,4 +76,8 @@ static inline void osmo_talloc_replace_string(void *ctx, char **dst, char *newst *dst = talloc_strdup(ctx, newstr); } +int osmo_constant_time_cmp(const uint8_t *exp, const uint8_t *rel, const int count); +uint64_t osmo_decode_big_endian(const uint8_t *data, size_t data_len); +uint8_t *osmo_encode_big_endian(uint64_t value, size_t data_len); + /*! @} */ |