DL6ER
|
84cdf61473
|
Always allocate strings to prevent subsequent free() to cause a failure of the process.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-01-12 15:10:33 +01:00 |
|
DL6ER
|
054dfce203
|
Check for hostname != NULL is obsolete
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-01-07 19:22:49 +01:00 |
|
DL6ER
|
427f8ad8e1
|
Further review comments. Always allocate vendor so we can always free this pointer. Add a callback for the update subroutine.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-01-07 18:46:57 +01:00 |
|
DL6ER
|
486e497d8a
|
Review comments
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-01-07 02:17:22 +01:00 |
|
DL6ER
|
9e6696575c
|
Change code to ensure hostname is always set
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-01-07 02:10:06 +01:00 |
|
DL6ER
|
d01d660bc5
|
Separate error messages into two if-statements
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-01-07 02:09:10 +01:00 |
|
DL6ER
|
078b2ff26d
|
Free memory when breaking
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-01-07 02:08:52 +01:00 |
|
DL6ER
|
0742d4c21a
|
Use simple cast of sqlite3_column_text() instead of using asprintf()
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-01-07 02:04:41 +01:00 |
|
DL6ER
|
a2b7a241e2
|
Add routine to update all existing network table entries using the latest mac->vendor database
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2018-12-31 00:18:50 +01:00 |
|
DL6ER
|
92d819899e
|
Add MAC->Vendor database support. We will provide the database as an optional auxiliary file.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2018-12-30 23:35:15 +01:00 |
|
DL6ER
|
d8fdf76ceb
|
Store number of queries per client in the database
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2018-12-28 12:18:35 +01:00 |
|
DL6ER
|
54253bd7d5
|
Added more comments
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2018-12-26 11:25:41 +01:00 |
|
DL6ER
|
3a8c87907a
|
Initialize new devices with lastQuery property if available
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2018-12-26 11:14:25 +01:00 |
|
DL6ER
|
465a4900ec
|
Use one big transaction for changes to be written to the network table and skip incomplete entires when parsing the ARP cache
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2018-12-26 01:21:31 +01:00 |
|
DL6ER
|
95d3c02c5f
|
Store lastQuery property for known clients
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2018-12-25 22:35:16 +01:00 |
|
DL6ER
|
82b43c332b
|
Parse ARP cache after storing queries into long-term database(usen the dedicated database thread)
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2018-12-25 17:56:44 +01:00 |
|
DL6ER
|
c7bdf9bd60
|
Update if device uses Pi-hole and store host name if available
Print executed SQL statements when in debug mode
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2018-12-25 13:45:34 +01:00 |
|
DL6ER
|
40fd4d317e
|
Add / update rows in table network depending on what we see in the ARP cache
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2018-12-24 13:19:18 +01:00 |
|
DL6ER
|
36d1499804
|
Add network table. This will update the database to version 3. Furthermore, we make some database routines globally (add prototypes to routines.h) and mark some internal database variables as static. This commit also improves on the speed of the database routines as the main loop is changed to run from the last saved query to the most recent one instead of looping over all queries in memory. This ID is corrected when queries are removed in gc.c
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2018-12-23 12:51:03 +01:00 |
|