100 static uint8_t tcap_map_raw_v2[] = {
101 0x62, 0x43, 0x48, 0x01, 0x01, 0x6b, 0x80, 0x28,
102 0x80, 0x06, 0x07, 0x00, 0x11, 0x86, 0x05, 0x01,
103 0x01, 0x01, 0xa0, 0x80, 0x60, 0x80, 0x80, 0x02,
104 0x07, 0x80, 0xa1, 0x80, 0x06, 0x07, 0x04, 0x00,
105 0x00, 0x01, 0x00, 0x0e, 0x02, 0x00, 0x00, 0x00,
106 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c,
107 0x14, 0xa1, 0x80, 0x02, 0x01, 0x03, 0x02, 0x01,
108 0x38, 0x04, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
109 0xff, 0xff, 0xff, 0x00, 0x00 };
111 static uint8_t tcap_map_raw_v3[] = {
112 0x62, 0x48, 0x48, 0x01, 0x01, 0x6b, 0x80, 0x28,
113 0x80, 0x06, 0x07, 0x00, 0x11, 0x86, 0x05, 0x01,
114 0x01, 0x01, 0xa0, 0x80, 0x60, 0x80, 0x80, 0x02,
115 0x07, 0x80, 0xa1, 0x80, 0x06, 0x07, 0x04, 0x00,
116 0x00, 0x01, 0x00, 0x0e, 0x03, 0x00, 0x00, 0x00,
117 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c,
118 0x19, 0xa1, 0x80, 0x02, 0x01, 0x01, 0x02, 0x01,
119 0x38, 0x30, 0x0d, 0x80, 0x00, 0x00, 0x00, 0x00,
120 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x01,
129 struct mtp_m3ua_client_link *m3ua_client = talloc_get_type_abort(conn->
mtp3_link->data,
130 struct mtp_m3ua_client_link);
134 if (!mtp_m3ua_link_is_up(m3ua_client)) {
135 ERROR(
"Link not yet active, dropping the request");
141 ERROR(
"Too many outstanding requests, dropping the request");
148 DEBUG4(
"Allocating buffer for MAP v2, %zu bytes",
sizeof(tcap_map_raw_v2));
149 msg = msgb_alloc(
sizeof(tcap_map_raw_v2),
"sccp: tcap_map");
150 msg->l3h = msgb_put(
msg,
sizeof(tcap_map_raw_v2));
151 memcpy(
msg->l3h, tcap_map_raw_v2,
sizeof(tcap_map_raw_v2));
153 *(
msg->l3h + 0x3a) = talloc_array_length(req->
imsi);
154 memcpy(
msg->l3h + 0x3b, req->
imsi, talloc_array_length(req->
imsi));
160 DEBUG4(
"Allocating buffer for MAP v3, %zu bytes",
sizeof(tcap_map_raw_v3));
161 msg = msgb_alloc(
sizeof(tcap_map_raw_v3),
"sccp: tcap_map");
162 msg->l3h = msgb_put(
msg,
sizeof(tcap_map_raw_v3));
163 memcpy(
msg->l3h, tcap_map_raw_v3,
sizeof(tcap_map_raw_v3));
165 *(
msg->l3h + 0x3c) = talloc_array_length(req->
imsi);
166 memcpy(
msg->l3h + 0x3d, req->
imsi, talloc_array_length(req->
imsi));
181 txn->
ctx.invoke_id++;
182 txn->
ctx.invoke_id &= 0x7f;
183 DEBUG2(
"Sending request with OTID %u Invoke ID %u", txn->
ctx.otid, txn->
ctx.invoke_id);
186 ERROR(
"Failed inserting transaction, maybe at txn limit?");
195 *(
msg->l3h + 0x04) = txn->
ctx.otid;
196 *(
msg->l3h + 0x35) = txn->
ctx.invoke_id;
199 SCCP_PROTOCOL_RETURN_MESSAGE << 4 | SCCP_PROTOCOL_CLASS_0, ctx);
203 txn->
ctx.timer.data = txn;
206 osmo_timer_schedule(&txn->
ctx.timer, 1, 0);