diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2019-06-03 15:39:13 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2019-06-03 17:17:58 +0700 |
commit | 98f0675ffcf54a1787a4ad90e1ee5e71ae632a57 (patch) | |
tree | 2f845aef92eca9c621785c0b5929f37c9a3fb6f0 /tests/stubs.c | |
parent | dcf2868e62f2ca5e8c81fdb20bbc4c5c5be94392 (diff) |
tests: share stubs.h from msc_vlr_test as stubs.c
We also need stubs for the upcoming db_sms tests.
Due to a known bug of automake [1], we cannot use 'subdir-objects',
so as a side effect this change introduces some autoreconf warnings.
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=752993
Change-Id: I8846c940f2695fd33e1007fecac83e73f508bb34
Diffstat (limited to 'tests/stubs.c')
-rw-r--r-- | tests/stubs.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/stubs.c b/tests/stubs.c new file mode 100644 index 000000000..d011a312a --- /dev/null +++ b/tests/stubs.c @@ -0,0 +1,43 @@ +/* (C) 2018-2019 by sysmocom s.f.m.c. GmbH + * All Rights Reserved + * + * Author: Harald Welte, Philipp Maier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +#include <osmocom/core/linuxlist.h> +#include <osmocom/netif/stream.h> + +void osmo_stream_srv_link_set_data(struct osmo_stream_srv_link *link, void *data) {} +struct osmo_fd *osmo_stream_srv_get_ofd(struct osmo_stream_srv *srv) { return NULL; } +void osmo_stream_srv_destroy(struct osmo_stream_srv *conn) {} +struct osmo_stream_srv *osmo_stream_srv_create(void *ctx, struct osmo_stream_srv_link *link, + int fd, int (*cb)(struct osmo_stream_srv *conn), + int (*closed_cb)(struct osmo_stream_srv *conn), + void *data) { return NULL; } +void osmo_stream_srv_send(struct osmo_stream_srv *conn, struct msgb *msg) {} +void osmo_stream_srv_link_set_proto(struct osmo_stream_srv_link *link, uint16_t proto) {} +struct osmo_fd *osmo_stream_srv_link_get_ofd(struct osmo_stream_srv_link *link) { return NULL; } +struct osmo_stream_srv_link *osmo_stream_srv_link_create(void *ctx) { return NULL; } +void *osmo_stream_srv_get_data(struct osmo_stream_srv *conn) { return NULL; } +void osmo_stream_srv_link_set_nodelay(struct osmo_stream_srv_link *link, bool nodelay) {} +void osmo_stream_srv_link_set_accept_cb(struct osmo_stream_srv_link *link, int (*accept_cb) + (struct osmo_stream_srv_link *link, int fd)) {} +int osmo_stream_srv_link_open(struct osmo_stream_srv_link *link) { return 0; } +void *osmo_stream_srv_link_get_data(struct osmo_stream_srv_link *link) { return NULL; } +void osmo_stream_srv_link_set_port(struct osmo_stream_srv_link *link, uint16_t port) {} +void osmo_stream_srv_link_set_addr(struct osmo_stream_srv_link *link, const char *addr) {} +int sctp_recvmsg(int sd, void *msg, size_t len, void *from, void *fromlen, void *info, int *msg_flags) { return 0; } |