summaryrefslogtreecommitdiffstats
path: root/openbsc/src/libabis
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@gnumonks.org>2011-05-07 12:12:48 +0200
committerPablo Neira Ayuso <pablo@gnumonks.org>2011-05-07 12:58:59 +0200
commitc0d17f22663ba78f1620043316ac7d374ff45b86 (patch)
tree3d374c0934694dd5cac6afc5991ffa5968869157 /openbsc/src/libabis
parentdfb342c19af19b60350849f40d1be5e8f7a530a5 (diff)
src: use namespace prefix osmo_* for misc 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
Diffstat (limited to 'openbsc/src/libabis')
-rw-r--r--openbsc/src/libabis/e1_input.c14
-rw-r--r--openbsc/src/libabis/input/dahdi.c8
-rw-r--r--openbsc/src/libabis/input/hsl.c4
-rw-r--r--openbsc/src/libabis/input/ipaccess.c4
-rw-r--r--openbsc/src/libabis/input/misdn.c8
5 files changed, 19 insertions, 19 deletions
diff --git a/openbsc/src/libabis/e1_input.c b/openbsc/src/libabis/e1_input.c
index dd3385205..089d54455 100644
--- a/openbsc/src/libabis/e1_input.c
+++ b/openbsc/src/libabis/e1_input.c
@@ -107,11 +107,11 @@ struct lapd_header {
uint8_t control_foo; /* fake UM's ... */
} __attribute__((packed));
-static_assert(offsetof(struct fake_linux_lapd_header, hatype) == 2, hatype_offset);
-static_assert(offsetof(struct fake_linux_lapd_header, halen) == 4, halen_offset);
-static_assert(offsetof(struct fake_linux_lapd_header, addr) == 6, addr_offset);
-static_assert(offsetof(struct fake_linux_lapd_header, protocol) == 14, proto_offset);
-static_assert(sizeof(struct fake_linux_lapd_header) == 16, lapd_header_size);
+osmo_static_assert(offsetof(struct fake_linux_lapd_header, hatype) == 2, hatype_offset);
+osmo_static_assert(offsetof(struct fake_linux_lapd_header, halen) == 4, halen_offset);
+osmo_static_assert(offsetof(struct fake_linux_lapd_header, addr) == 6, addr_offset);
+osmo_static_assert(offsetof(struct fake_linux_lapd_header, protocol) == 14, proto_offset);
+osmo_static_assert(sizeof(struct fake_linux_lapd_header) == 16, lapd_header_size);
static int pcap_fd = -1;
@@ -229,12 +229,12 @@ int abis_rsl_sendmsg(struct msgb *msg)
if (!msg->trx) {
LOGP(DRSL, LOGL_ERROR, "rsl_sendmsg: msg->trx == NULL: %s\n",
- hexdump(msg->data, msg->len));
+ osmo_hexdump(msg->data, msg->len));
talloc_free(msg);
return -EINVAL;
} else if (!msg->trx->rsl_link) {
LOGP(DRSL, LOGL_ERROR, "rsl_sendmsg: msg->trx->rsl_link == NULL: %s\n",
- hexdump(msg->data, msg->len));
+ osmo_hexdump(msg->data, msg->len));
talloc_free(msg);
return -EIO;
}
diff --git a/openbsc/src/libabis/input/dahdi.c b/openbsc/src/libabis/input/dahdi.c
index 9b85b7dbc..6f8983763 100644
--- a/openbsc/src/libabis/input/dahdi.c
+++ b/openbsc/src/libabis/input/dahdi.c
@@ -147,7 +147,7 @@ static int handle_ts1_read(struct osmo_fd *bfd)
msg->l2h = msg->data + 2;
else
msg->l2h = msg->data + 1;
- DEBUGP(DMI, "RX: %s\n", hexdump(msgb_l2(msg), ret));
+ DEBUGP(DMI, "RX: %s\n", osmo_hexdump(msgb_l2(msg), ret));
ret = e1inp_rx_ts(e1i_ts, msg, tei, sapi);
break;
default:
@@ -214,7 +214,7 @@ static int handle_ts1_write(struct osmo_fd *bfd)
return 0;
}
- DEBUGP(DMI, "TX: %s\n", hexdump(msg->data, msg->len));
+ DEBUGP(DMI, "TX: %s\n", osmo_hexdump(msg->data, msg->len));
lapd_transmit(e1i_ts->driver.dahdi.lapd, sign_link->tei,
sign_link->sapi, msg->data, msg->len);
msgb_free(msg);
@@ -277,7 +277,7 @@ static int handle_tsX_write(struct osmo_fd *bfd)
}
DEBUGP(DMIB, "BCHAN TX: %s\n",
- hexdump(tx_buf, D_BCHAN_TX_GRAN));
+ osmo_hexdump(tx_buf, D_BCHAN_TX_GRAN));
if (invertbits) {
flip_buf_bits(tx_buf, ret);
@@ -318,7 +318,7 @@ static int handle_tsX_read(struct osmo_fd *bfd)
msg->l2h = msg->data;
DEBUGP(DMIB, "BCHAN RX: %s\n",
- hexdump(msgb_l2(msg), ret));
+ osmo_hexdump(msgb_l2(msg), ret));
ret = e1inp_rx_ts(e1i_ts, msg, 0, 0);
/* physical layer indicates that data has been sent,
* we thus can send some more data */
diff --git a/openbsc/src/libabis/input/hsl.c b/openbsc/src/libabis/input/hsl.c
index af95afa3b..e842f0dec 100644
--- a/openbsc/src/libabis/input/hsl.c
+++ b/openbsc/src/libabis/input/hsl.c
@@ -218,7 +218,7 @@ static int handle_ts1_read(struct osmo_fd *bfd)
return error;
}
- DEBUGP(DMI, "RX %u: %s\n", ts_nr, hexdump(msgb_l2(msg), msgb_l2len(msg)));
+ DEBUGP(DMI, "RX %u: %s\n", ts_nr, osmo_hexdump(msgb_l2(msg), msgb_l2len(msg)));
hh = (struct ipaccess_head *) msg->data;
if (hh->proto == HSL_PROTO_DEBUG) {
@@ -330,7 +330,7 @@ static int handle_ts1_write(struct osmo_fd *bfd)
msg->l2h = msg->data;
ipaccess_prepend_header(msg, sign_link->tei);
- DEBUGP(DMI, "TX %u: %s\n", ts_nr, hexdump(msg->l2h, msgb_l2len(msg)));
+ DEBUGP(DMI, "TX %u: %s\n", ts_nr, osmo_hexdump(msg->l2h, msgb_l2len(msg)));
ret = send(bfd->fd, msg->data, msg->len, 0);
msgb_free(msg);
diff --git a/openbsc/src/libabis/input/ipaccess.c b/openbsc/src/libabis/input/ipaccess.c
index 13294dc1f..8080129f2 100644
--- a/openbsc/src/libabis/input/ipaccess.c
+++ b/openbsc/src/libabis/input/ipaccess.c
@@ -509,7 +509,7 @@ static int handle_ts1_read(struct osmo_fd *bfd)
return error;
}
- DEBUGP(DMI, "RX %u: %s\n", ts_nr, hexdump(msgb_l2(msg), msgb_l2len(msg)));
+ DEBUGP(DMI, "RX %u: %s\n", ts_nr, osmo_hexdump(msgb_l2(msg), msgb_l2len(msg)));
hh = (struct ipaccess_head *) msg->data;
if (hh->proto == IPAC_PROTO_IPACCESS) {
@@ -623,7 +623,7 @@ static int handle_ts1_write(struct osmo_fd *bfd)
msg->l2h = msg->data;
ipaccess_prepend_header(msg, sign_link->tei);
- DEBUGP(DMI, "TX %u: %s\n", ts_nr, hexdump(msg->l2h, msgb_l2len(msg)));
+ DEBUGP(DMI, "TX %u: %s\n", ts_nr, osmo_hexdump(msg->l2h, msgb_l2len(msg)));
ret = send(bfd->fd, msg->data, msg->len, 0);
msgb_free(msg);
diff --git a/openbsc/src/libabis/input/misdn.c b/openbsc/src/libabis/input/misdn.c
index d239ee75c..ab92d612f 100644
--- a/openbsc/src/libabis/input/misdn.c
+++ b/openbsc/src/libabis/input/misdn.c
@@ -162,7 +162,7 @@ static int handle_ts1_read(struct osmo_fd *bfd)
case DL_DATA_IND:
case DL_UNITDATA_IND:
msg->l2h = msg->data + MISDN_HEADER_LEN;
- DEBUGP(DMI, "RX: %s\n", hexdump(msgb_l2(msg), ret - MISDN_HEADER_LEN));
+ DEBUGP(DMI, "RX: %s\n", osmo_hexdump(msgb_l2(msg), ret - MISDN_HEADER_LEN));
ret = e1inp_rx_ts(e1i_ts, msg, l2addr.tei, l2addr.sapi);
break;
case PH_ACTIVATE_IND:
@@ -229,7 +229,7 @@ static int handle_ts1_write(struct osmo_fd *bfd)
DEBUGP(DMI, "TX channel(%d) TEI(%d) SAPI(%d): %s\n",
sign_link->driver.misdn.channel, sign_link->tei,
- sign_link->sapi, hexdump(l2_data, msg->len - MISDN_HEADER_LEN));
+ sign_link->sapi, osmo_hexdump(l2_data, msg->len - MISDN_HEADER_LEN));
/* construct the sockaddr */
sa.family = AF_ISDN;
@@ -269,7 +269,7 @@ static int handle_tsX_write(struct osmo_fd *bfd)
subchan_mux_out(mx, tx_buf+sizeof(*hh), BCHAN_TX_GRAN);
DEBUGP(DMIB, "BCHAN TX: %s\n",
- hexdump(tx_buf+sizeof(*hh), BCHAN_TX_GRAN));
+ osmo_hexdump(tx_buf+sizeof(*hh), BCHAN_TX_GRAN));
ret = send(bfd->fd, tx_buf, sizeof(*hh) + BCHAN_TX_GRAN, 0);
if (ret < sizeof(*hh) + BCHAN_TX_GRAN)
@@ -311,7 +311,7 @@ static int handle_tsX_read(struct osmo_fd *bfd)
case PH_DATA_IND:
msg->l2h = msg->data + MISDN_HEADER_LEN;
DEBUGP(DMIB, "BCHAN RX: %s\n",
- hexdump(msgb_l2(msg), ret - MISDN_HEADER_LEN));
+ osmo_hexdump(msgb_l2(msg), ret - MISDN_HEADER_LEN));
ret = e1inp_rx_ts(e1i_ts, msg, 0, 0);
break;
case PH_ACTIVATE_IND: