summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@gnumonks.org>2011-05-15 14:23:17 +0200
committerPablo Neira Ayuso <pablo@gnumonks.org>2011-05-15 17:33:26 +0200
commita1d16802457164ce9d90ae023aba06a4c38d05fd (patch)
treeb98f0f947deedf0d94bfc62b7c0026600a089199
parent0e6cea9b5172e61c934128ee7179cc04d0aa613f (diff)
src: use namespace prefix osmo_* for utils
Summary of changes: s/bcd2char/osmo_bcd2char/g s/char2bcd/osmo_char2bcd/g s/hexparse/osmo_hexparse/g s/hexdump/osmo_hexdump/g s/hexdump_nospc/osmo_hexdump_nospc/g s/ubit_dump/osmo_ubit_dump/g s/static_assert/osmo_static_assert/g
-rw-r--r--src/host/layer23/src/common/l1ctl.c6
-rw-r--r--src/host/layer23/src/common/l1l2_interface.c2
-rw-r--r--src/host/layer23/src/common/sap_interface.c2
-rw-r--r--src/host/layer23/src/misc/app_cbch_sniff.c2
-rw-r--r--src/host/layer23/src/mobile/vty_interface.c4
-rw-r--r--src/host/osmocon/osmocon.c8
-rw-r--r--src/host/osmocon/osmoload.c10
7 files changed, 17 insertions, 17 deletions
diff --git a/src/host/layer23/src/common/l1ctl.c b/src/host/layer23/src/common/l1ctl.c
index a2fd865f..2482c615 100644
--- a/src/host/layer23/src/common/l1ctl.c
+++ b/src/host/layer23/src/common/l1ctl.c
@@ -152,7 +152,7 @@ static int rx_ph_data_ind(struct osmocom_ms *ms, struct msgb *msg)
DEBUGP(DL1C, "%s (%.4u/%.2u/%.2u) %d dBm: %s\n",
rsl_chan_nr_str(dl->chan_nr), tm.t1, tm.t2, tm.t3,
(int)dl->rx_level-110,
- hexdump(ccch->data, sizeof(ccch->data)));
+ osmo_hexdump(ccch->data, sizeof(ccch->data)));
meas->last_fn = ntohl(dl->frame_nr);
meas->frames++;
@@ -266,7 +266,7 @@ int l1ctl_tx_data_req(struct osmocom_ms *ms, struct msgb *msg,
uint8_t chan_type, chan_ts, chan_ss;
uint8_t gsmtap_chan_type;
- DEBUGP(DL1C, "(%s)\n", hexdump(msg->l2h, msgb_l2len(msg)));
+ DEBUGP(DL1C, "(%s)\n", osmo_hexdump(msg->l2h, msgb_l2len(msg)));
if (msgb_l2len(msg) > 23) {
LOGP(DL1C, LOGL_ERROR, "L1 cannot handle message length "
@@ -604,7 +604,7 @@ static int rx_l1_sim_conf(struct osmocom_ms *ms, struct msgb *msg)
uint16_t len = msg->len - sizeof(struct l1ctl_hdr);
uint8_t *data = msg->data + sizeof(struct l1ctl_hdr);
- LOGP(DL1C, LOGL_INFO, "SIM %s\n", hexdump(data, len));
+ LOGP(DL1C, LOGL_INFO, "SIM %s\n", osmo_hexdump(data, len));
/* pull the L1 header from the msgb */
msgb_pull(msg, sizeof(struct l1ctl_hdr));
diff --git a/src/host/layer23/src/common/l1l2_interface.c b/src/host/layer23/src/common/l1l2_interface.c
index 2abb6608..abaa64f6 100644
--- a/src/host/layer23/src/common/l1l2_interface.c
+++ b/src/host/layer23/src/common/l1l2_interface.c
@@ -158,7 +158,7 @@ int osmo_send_l1(struct osmocom_ms *ms, struct msgb *msg)
{
uint16_t *len;
- DEBUGP(DL1C, "Sending: '%s'\n", hexdump(msg->data, msg->len));
+ DEBUGP(DL1C, "Sending: '%s'\n", osmo_hexdump(msg->data, msg->len));
if (msg->l1h != msg->data)
LOGP(DL1C, LOGL_ERROR, "Message L1 header != Message Data\n");
diff --git a/src/host/layer23/src/common/sap_interface.c b/src/host/layer23/src/common/sap_interface.c
index 5d928402..fd5cdc3b 100644
--- a/src/host/layer23/src/common/sap_interface.c
+++ b/src/host/layer23/src/common/sap_interface.c
@@ -161,7 +161,7 @@ int osmosap_send(struct osmocom_ms *ms, struct msgb *msg)
if (ms->sap_wq.bfd.fd <= 0)
return -EINVAL;
- DEBUGP(DSAP, "Sending: '%s'\n", hexdump(msg->data, msg->len));
+ DEBUGP(DSAP, "Sending: '%s'\n", osmo_hexdump(msg->data, msg->len));
if (msg->l1h != msg->data)
LOGP(DSAP, LOGL_ERROR, "Message SAP header != Message Data\n");
diff --git a/src/host/layer23/src/misc/app_cbch_sniff.c b/src/host/layer23/src/misc/app_cbch_sniff.c
index 2df1e549..bda9aae8 100644
--- a/src/host/layer23/src/misc/app_cbch_sniff.c
+++ b/src/host/layer23/src/misc/app_cbch_sniff.c
@@ -52,7 +52,7 @@ static int try_cbch(struct osmocom_ms *ms, struct gsm48_sysinfo *s)
"HSN = %d hseq (%d): %s\n",
s->chan_nr, s->tsc, s->maio, s->hsn,
s->hopp_len,
- hexdump((unsigned char *) s->hopping, s->hopp_len * 2));
+ osmo_hexdump((unsigned char *) s->hopping, s->hopp_len * 2));
return l1ctl_tx_dm_est_req_h1(ms,
s->maio, s->hsn, s->hopping, s->hopp_len,
s->chan_nr, s->tsc,
diff --git a/src/host/layer23/src/mobile/vty_interface.c b/src/host/layer23/src/mobile/vty_interface.c
index debe36e0..80a756c9 100644
--- a/src/host/layer23/src/mobile/vty_interface.c
+++ b/src/host/layer23/src/mobile/vty_interface.c
@@ -1170,11 +1170,11 @@ static void config_write_ms(struct vty *vty, struct osmocom_ms *ms)
vty_out(vty, " imsi %s%s", set->test_imsi, VTY_NEWLINE);
switch (set->test_ki_type) {
case GSM_SIM_KEY_XOR:
- vty_out(vty, " ki xor %s%s", hexdump(set->test_ki, 12),
+ vty_out(vty, " ki xor %s%s", osmo_hexdump(set->test_ki, 12),
VTY_NEWLINE);
break;
case GSM_SIM_KEY_COMP128:
- vty_out(vty, " ki comp128 %s%s", hexdump(set->test_ki, 16),
+ vty_out(vty, " ki comp128 %s%s", osmo_hexdump(set->test_ki, 16),
VTY_NEWLINE);
break;
}
diff --git a/src/host/osmocon/osmocon.c b/src/host/osmocon/osmocon.c
index ab977c13..7f8d3ac7 100644
--- a/src/host/osmocon/osmocon.c
+++ b/src/host/osmocon/osmocon.c
@@ -447,7 +447,7 @@ int read_file(const char *filename)
return 0;
}
-static void osmocon_hexdump(const uint8_t *data, unsigned int len)
+static void osmocon_osmo_hexdump(const uint8_t *data, unsigned int len)
{
int n;
@@ -754,7 +754,7 @@ static void hdlc_send_to_phone(uint8_t dlci, uint8_t *data, int len)
if(dnload.dump_tx) {
printf("hdlc_send(dlci=%u): ", dlci);
- osmocon_hexdump(data, len);
+ osmocon_osmo_hexdump(data, len);
}
if (len > 512) {
@@ -792,7 +792,7 @@ static void hdlc_tool_cb(uint8_t dlci, struct msgb *msg)
if(dnload.dump_rx) {
printf("hdlc_recv(dlci=%u): ", dlci);
- osmocon_hexdump(msg->data, msg->len);
+ osmocon_osmo_hexdump(msg->data, msg->len);
}
if(srv) {
@@ -832,7 +832,7 @@ static int handle_buffer(int buf_used_len)
if (!dnload.expect_hdlc) {
printf("got %i bytes from modem, ", nbytes);
printf("data looks like: ");
- osmocon_hexdump(bufptr, nbytes);
+ osmocon_osmo_hexdump(bufptr, nbytes);
} else {
for (i = 0; i < nbytes; ++i)
if (sercomm_drv_rx_char(bufptr[i]) == 0)
diff --git a/src/host/osmocon/osmoload.c b/src/host/osmocon/osmoload.c
index 1471a2e6..5848e560 100644
--- a/src/host/osmocon/osmoload.c
+++ b/src/host/osmocon/osmoload.c
@@ -146,7 +146,7 @@ static int version(const char *name)
exit(2);
}
-static void osmoload_hexdump(const uint8_t *data, unsigned int len)
+static void osmoload_osmo_hexdump(const uint8_t *data, unsigned int len)
{
const uint8_t *bufptr = data;
const uint8_t const *endptr = bufptr + len;
@@ -190,7 +190,7 @@ loader_send_request(struct msgb *msg) {
if(osmoload.print_requests) {
printf("Sending %d bytes:\n", msg->len);
- osmoload_hexdump(msg->data, msg->len);
+ osmoload_osmo_hexdump(msg->data, msg->len);
}
rc = write(connection.fd, &len, sizeof(len));
@@ -277,7 +277,7 @@ static void
loader_handle_reply(struct msgb *msg) {
if(osmoload.print_replies) {
printf("Received %d bytes:\n", msg->len);
- osmoload_hexdump(msg->data, msg->len);
+ osmoload_osmo_hexdump(msg->data, msg->len);
}
uint8_t cmd = msgb_get_u8(msg);
@@ -338,7 +338,7 @@ loader_handle_reply(struct msgb *msg) {
break;
default:
printf("Received unknown reply %d:\n", cmd);
- osmoload_hexdump(msg->data, msg->len);
+ osmoload_osmo_hexdump(msg->data, msg->len);
osmoload.quit = 1;
return;
}
@@ -364,7 +364,7 @@ loader_handle_reply(struct msgb *msg) {
break;
case LOADER_MEM_READ:
printf("Received memory dump of %d bytes at 0x%x:\n", length, address);
- osmoload_hexdump(data, length);
+ osmoload_osmo_hexdump(data, length);
break;
case LOADER_MEM_WRITE:
printf("Confirmed memory write of %d bytes at 0x%x.\n", length, address);