diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2020-04-28 09:30:52 +0200 |
---|---|---|
committer | Sylvain Munaut <tnt@246tNt.com> | 2020-04-28 09:50:59 +0200 |
commit | e55e76f4c7774d29da445c8e6f73966edbbda57b (patch) | |
tree | d765136df091dd3513016b1ee55350d995a9691a /src/osmo-bsc/abis_om2000.c | |
parent | d9fe61c43f73eb98d6f9c0238a0495b585b5d80c (diff) |
om2k: Add VTY command to allow TX of arbitrary message for testing
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I5a385614fc670946f83ea79cc176c2d448675672
Diffstat (limited to 'src/osmo-bsc/abis_om2000.c')
-rw-r--r-- | src/osmo-bsc/abis_om2000.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/osmo-bsc/abis_om2000.c b/src/osmo-bsc/abis_om2000.c index e1a526ce0..b221441ff 100644 --- a/src/osmo-bsc/abis_om2000.c +++ b/src/osmo-bsc/abis_om2000.c @@ -1129,6 +1129,21 @@ int abis_om2k_tx_cap_req(struct gsm_bts *bts, const struct abis_om2k_mo *mo) return abis_om2k_tx_simple(bts, mo, OM2K_MSGT_CAPA_REQ); } +int abis_om2k_tx_arb(struct gsm_bts *bts, struct abis_om2k_mo *mo, + uint16_t req, uint8_t *buf, int buf_len) +{ + struct msgb *msg = om2k_msgb_alloc(); + struct abis_om2k_hdr *o2k; + + o2k = (struct abis_om2k_hdr *) msgb_put(msg, sizeof(*o2k)); + fill_om2k_hdr(o2k, mo, req); + + if (buf_len) + memcpy(msgb_put(msg, buf_len), buf, buf_len); + + return abis_om2k_sendmsg(bts, msg); +} + static void om2k_fill_is_conn_grp(struct om2k_is_conn_grp *grp, uint16_t icp1, uint16_t icp2, uint8_t cont_idx) { |