Harald Welte | 8fbf82b | 2018-06-24 11:27:40 +0200 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <stdint.h> |
Neels Hofmeyr | 2f75803 | 2019-11-20 00:37:07 +0100 | [diff] [blame] | 4 | #include <osmocom/hlr/gsup_server.h> |
Harald Welte | 8fbf82b | 2018-06-24 11:27:40 +0200 | [diff] [blame] | 5 | |
Oliver Smith | 95abc2b | 2019-04-04 12:00:24 +0200 | [diff] [blame] | 6 | struct gsup_route { |
| 7 | struct llist_head list; |
| 8 | |
| 9 | uint8_t *addr; |
| 10 | struct osmo_gsup_conn *conn; |
| 11 | }; |
| 12 | |
Harald Welte | e687be5 | 2016-05-03 18:49:27 +0200 | [diff] [blame] | 13 | struct osmo_gsup_conn *gsup_route_find(struct osmo_gsup_server *gs, |
| 14 | const uint8_t *addr, size_t addrlen); |
| 15 | |
Oliver Smith | 95abc2b | 2019-04-04 12:00:24 +0200 | [diff] [blame] | 16 | struct gsup_route *gsup_route_find_by_conn(const struct osmo_gsup_conn *conn); |
| 17 | |
Harald Welte | e687be5 | 2016-05-03 18:49:27 +0200 | [diff] [blame] | 18 | /* add a new route for the given address to the given conn */ |
| 19 | int gsup_route_add(struct osmo_gsup_conn *conn, const uint8_t *addr, size_t addrlen); |
| 20 | |
| 21 | /* delete all routes for the given connection */ |
| 22 | int gsup_route_del_conn(struct osmo_gsup_conn *conn); |
Harald Welte | bd72f13 | 2018-06-24 11:26:43 +0200 | [diff] [blame] | 23 | |
| 24 | int osmo_gsup_addr_send(struct osmo_gsup_server *gs, |
| 25 | const uint8_t *addr, size_t addrlen, |
| 26 | struct msgb *msg); |