From 0196c9936c5a0ddbfd62bfc0f19bf628f11470ee Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 4 Aug 2014 17:10:08 +0200 Subject: gbproxy/test: Test TLLI expiry This adds a unit test for gbprox_register_tlli() and gbprox_remove_stale_tllis(). The dump_peers() function is extended by a cfg parameter to support a non-global gbproxy_config. Done with Jacob --- openbsc/include/openbsc/gb_proxy.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'openbsc/include/openbsc') diff --git a/openbsc/include/openbsc/gb_proxy.h b/openbsc/include/openbsc/gb_proxy.h index 9c256793f..3f8155182 100644 --- a/openbsc/include/openbsc/gb_proxy.h +++ b/openbsc/include/openbsc/gb_proxy.h @@ -120,4 +120,12 @@ int gbprox_remove_stale_tllis(struct gbproxy_peer *peer, time_t now); int gbprox_cleanup_peers(struct gbproxy_config *cfg, uint16_t nsei, uint16_t bvci); struct gbproxy_peer *gbprox_peer_by_nsei(struct gbproxy_config *cfg, uint16_t nsei); + +struct gbproxy_tlli_info *gbprox_find_tlli_by_mi(struct gbproxy_peer *peer, + const uint8_t *mi_data, size_t mi_data_len); +void gbprox_register_tlli(struct gbproxy_peer *peer, uint32_t tlli, + const uint8_t *imsi, size_t imsi_len); +struct gbproxy_peer *gbproxy_peer_alloc(struct gbproxy_config *cfg, uint16_t bvci); +void gbproxy_peer_free(struct gbproxy_peer *peer); + #endif -- cgit v1.2.3