summaryrefslogtreecommitdiffstats
path: root/tools/l2ping.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2003-07-24 17:34:34 +0000
committerMarcel Holtmann <marcel@holtmann.org>2003-07-24 17:34:34 +0000
commit6b410af5c3e83f36ed8b5a620f1ab3029a271058 (patch)
tree24b7ec40b12997b4f13de490919e3673fc1df6eb /tools/l2ping.c
parent8891e1ab4d0832e12815bb94689fd0f87c06a11f (diff)
Kill usage of strtoba() and batostr()
Diffstat (limited to 'tools/l2ping.c')
-rw-r--r--tools/l2ping.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/l2ping.c b/tools/l2ping.c
index 310ba86b..d5d7748b 100644
--- a/tools/l2ping.c
+++ b/tools/l2ping.c
@@ -77,6 +77,7 @@ static void ping(char *svr)
struct sockaddr_l2 addr;
struct sigaction sa;
char buf[2048];
+ char str[18];
int s, i, opt, lost;
uint8_t id;
@@ -97,7 +98,7 @@ static void ping(char *svr)
exit(1);
}
- baswap(&addr.l2_bdaddr, strtoba(svr));
+ str2ba(svr, &addr.l2_bdaddr);
if (connect(s, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
perror("Can't connect.");
exit(1);
@@ -109,9 +110,9 @@ static void ping(char *svr)
perror("Can't get local address.");
exit(1);
}
- baswap(&bdaddr, &addr.l2_bdaddr);
+ ba2str(&addr.l2_bdaddr, str);
- printf("Ping: %s from %s (data size %d) ...\n", svr, batostr(&bdaddr), size);
+ printf("Ping: %s from %s (data size %d) ...\n", svr, str, size);
/* Initialize buffer */
for(i = L2CAP_CMD_HDR_SIZE; i < sizeof(buf); i++)
@@ -231,7 +232,7 @@ int main(int argc, char *argv[])
break;
case 'S':
- baswap(&bdaddr, strtoba(optarg));
+ str2ba(optarg, &bdaddr);
break;
default: