Harald Welte | bd44858 | 2016-12-23 23:41:14 +0100 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <stdint.h> |
| 4 | #include <osmocom/core/msgb.h> |
Harald Welte | ce2f396 | 2016-12-30 15:48:22 +0100 | [diff] [blame^] | 5 | #include <osmocom/core/gsmtap_util.h> |
Harald Welte | bd44858 | 2016-12-23 23:41:14 +0100 | [diff] [blame] | 6 | |
| 7 | struct diag_instance { |
| 8 | int fd; |
| 9 | struct { |
| 10 | struct msgb *msg; |
| 11 | void (*rcvmsg)(struct diag_instance *di, struct msgb *msg); |
| 12 | } rx; |
| 13 | struct { |
| 14 | } tx; |
Harald Welte | ce2f396 | 2016-12-30 15:48:22 +0100 | [diff] [blame^] | 15 | struct gsmtap_inst *gsmtap; |
Harald Welte | bd44858 | 2016-12-23 23:41:14 +0100 | [diff] [blame] | 16 | }; |
| 17 | |
| 18 | int diag_transmit_msgb(struct diag_instance *di, struct msgb *msg); |
| 19 | int diag_transmit_buf(struct diag_instance *di, const uint8_t *data, size_t data_len); |
| 20 | int diag_read(struct diag_instance *di); |