Re: [PATCH 1/3] tools: Add initial code for btmon-logger

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Szymon,

>>> This is intended for use for automted logging or unatrended systems.
>>> It doesn't contain any packet decoding functionality which results
>>> in much smaller binary.
>>> ---
>>> .gitignore           |   1 +
>>> Makefile.tools       |   6 +
>>> tools/btmon-logger.c | 359
>>> +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 366
>>> insertions(+)
>>> create mode 100644 tools/btmon-logger.c
>>> 
>>> diff --git a/.gitignore b/.gitignore
>>> index 47808059b..33ec66048 100644
>>> --- a/.gitignore
>>> +++ b/.gitignore
>>> @@ -118,6 +118,7 @@ tools/btconfig
>>> tools/btmgmt
>>> tools/btsnoop
>>> tools/btpclient
>>> +tools/btmon-logger
>>> peripheral/btsensor
>>> monitor/btmon
>>> emulator/btvirt
>>> diff --git a/Makefile.tools b/Makefile.tools
>>> index 651ff00ca..1accfb4f0 100644
>>> --- a/Makefile.tools
>>> +++ b/Makefile.tools
>>> @@ -62,6 +62,12 @@ monitor_btmon_SOURCES = monitor/main.c monitor/bt.h \
>>> 
>>> 				monitor/tty.h
>>> 
>>> monitor_btmon_LDADD = lib/libbluetooth-internal.la \
>>> 
>>> 				src/libshared-mainloop.la @UDEV_LIBS@
>>> 
>>> +
>>> +
>> 
>> one empty line.
>> 
>>> +noinst_PROGRAMS += tools/btmon-logger
>>> +
>>> +tools_btmon_logger_SOURCES = tools/btmon-logger.c
>>> +tools_btmon_logger_LDADD = src/libshared-mainloop.la
>>> endif
>>> 
>>> if TESTING
>>> diff --git a/tools/btmon-logger.c b/tools/btmon-logger.c
>>> new file mode 100644
>>> index 000000000..fe5f101b4
>>> --- /dev/null
>>> +++ b/tools/btmon-logger.c
>>> @@ -0,0 +1,359 @@
>>> +/*
>>> + *
>>> + *  BlueZ - Bluetooth protocol stack for Linux
>>> + *
>>> + *  Copyright (C) 2017  Codecoup
>> 
>> Lets assume that some of the code is copied from existing btmon sources and
>> so lets keep Intel copyright in place as well :)
>>> + *
>>> + *
>>> + *  This program is free software; you can redistribute it and/or modify
>>> + *  it under the terms of the GNU General Public License as published by
>>> + *  the Free Software Foundation; either version 2 of the License, or
>>> + *  (at your option) any later version.
>>> + *
>>> + *  This program is distributed in the hope that it will be useful,
>>> + *  but WITHOUT ANY WARRANTY; without even the implied warranty of
>>> + *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>>> + *  GNU General Public License for more details.
>>> + *
>>> + *  You should have received a copy of the GNU General Public License
>>> + *  along with this program; if not, write to the Free Software
>>> + *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
>>> USA + *
>>> + */
>>> +
>>> +#ifdef HAVE_CONFIG_H
>>> +#include <config.h>
>>> +#endif
>>> +
>>> +#include <stdio.h>
>>> +#include <stdlib.h>
>>> +#include <limits.h>
>>> +#include <string.h>
>>> +#include <time.h>
>>> +#include <getopt.h>
>>> +#include <unistd.h>
>>> +#include <sys/socket.h>
>>> +
>>> +#include "lib/bluetooth.h"
>>> +#include "lib/hci.h"
>>> +#include "lib/mgmt.h”
>> 
>> the mgmt.h should not be needed.
> 
> This is needed for struct mgmt_hdr definition.

hmmm. That seems like an odd dependency and I think we need to get rid of it. I know that the headers are alike, but that is more a coincidence than something that should bleed through in the code.

Regards

Marcel

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux