blob: bff484ea7a7eec2bdf24a8c49567a70f8b7f3db4 [file] [log] [blame]
Harald Welte8fbf82b2018-06-24 11:27:40 +02001#pragma once
2
3#include <stdint.h>
4#include "gsup_server.h"
5
Oliver Smith95abc2b2019-04-04 12:00:24 +02006struct gsup_route {
7 struct llist_head list;
8
9 uint8_t *addr;
10 struct osmo_gsup_conn *conn;
11};
12
Harald Weltee687be52016-05-03 18:49:27 +020013struct osmo_gsup_conn *gsup_route_find(struct osmo_gsup_server *gs,
14 const uint8_t *addr, size_t addrlen);
15
Oliver Smith95abc2b2019-04-04 12:00:24 +020016struct gsup_route *gsup_route_find_by_conn(const struct osmo_gsup_conn *conn);
17
Harald Weltee687be52016-05-03 18:49:27 +020018/* add a new route for the given address to the given conn */
19int gsup_route_add(struct osmo_gsup_conn *conn, const uint8_t *addr, size_t addrlen);
20
21/* delete all routes for the given connection */
22int gsup_route_del_conn(struct osmo_gsup_conn *conn);
Harald Weltebd72f132018-06-24 11:26:43 +020023
24int osmo_gsup_addr_send(struct osmo_gsup_server *gs,
25 const uint8_t *addr, size_t addrlen,
26 struct msgb *msg);