hnb-test: Send hard-coded HNB register request for now

This commit is contained in:
Daniel Willmann 2015-12-03 17:02:13 +01:00
parent 97374c039b
commit 4aeef6c3c4
1 changed files with 21 additions and 0 deletions

View File

@ -123,6 +123,25 @@ static int hnb_write_cb(struct osmo_fd *fd, struct msgb *msg)
return rc;
}
#include "pdus.h"
static void hnb_send_register_req(struct hnb_test *hnb_test)
{
struct msgb *msg;
int rc;
msg = msgb_alloc(1024, "HNBAP Tx");
memcpy(msgb_data(msg), hnbap_reg_req, sizeof(hnbap_reg_req));
msgb_put(msg, sizeof(hnbap_reg_req));
msgb_ppid(msg) = IUH_PPI_HNBAP;
osmo_wqueue_enqueue(&hnb_test->wqueue, msg);
}
static const struct log_info_cat log_cat[] = {
[DMAIN] = {
.name = "DMAIN", .loglevel = LOGL_DEBUG, .enabled = 1,
@ -168,6 +187,8 @@ int main(int argc, const char *argv)
}
// sctp_sock_init(g_hnb_test.conn_fd);
hnb_send_register_req(&g_hnb_test);
while (1) {
rc = osmo_select_main(0);
if (rc < 0)