Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process ARP data for new network table #455

Merged
merged 30 commits into from
Jan 9, 2019
Merged

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented Jan 6, 2019

By submitting this pull request, I confirm the following (please check boxes, eg [X]) Failure to fill the template will close your PR:

Please submit all pull requests against the development branch. Failure to do so will delay or deny your request

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

How familiar are you with the codebase?:

10


Parse ARP information of the device that runs pihole-FTL and put the information into a new database. Use MAC -> Vendor information if available. We provide the latter information in a separate database that is optional and has to be downloaded by the installer/updater (separate PR on pi-hole/core is in progress).

This will update the database to version 3.

The information will be made available on the web interface in the following form (see separate AdminLTE PR for further details):

screenshot from 2019-01-06 20-21-59

This template was created based on the work of udemy-dl.

…rmore, 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>
…P cache

Signed-off-by: DL6ER <dl6er@dl6er.de>
Print executed SQL statements when in debug mode

Signed-off-by: DL6ER <dl6er@dl6er.de>
…e dedicated database thread)

Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
…e and skip incomplete entires when parsing the ARP cache

Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
…optional auxiliary file.

Signed-off-by: DL6ER <dl6er@dl6er.de>
…test mac->vendor database

Signed-off-by: DL6ER <dl6er@dl6er.de>
… used by FTL

Signed-off-by: DL6ER <dl6er@dl6er.de>
…n't fail if there was no previous database present

Signed-off-by: DL6ER <dl6er@dl6er.de>
…interfere with later INSERT / UPDATE commands

Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>

Conflicts:
	Makefile
	routines.h
@DL6ER DL6ER requested a review from a team January 6, 2019 19:28
Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER mentioned this pull request Jan 6, 2019
9 tasks
@@ -319,6 +319,22 @@ void read_FTLconf(void)
// AUDITLISTFILE
getpath(fp, "AUDITLISTFILE", "/etc/pihole/auditlog.list", &files.auditlist);

// MACVENDORDB
getpath(fp, "MACVENDORDB", "/etc/pihole/macvendor.db", &FTLfiles.macvendordb);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requires documentation update.

config.c Outdated Show resolved Hide resolved
database.c Outdated Show resolved Hide resolved
networktable.c Outdated Show resolved Hide resolved
networktable.c Show resolved Hide resolved
networktable.c Show resolved Hide resolved
networktable.c Outdated Show resolved Hide resolved
networktable.c Outdated Show resolved Hide resolved
networktable.c Show resolved Hide resolved
networktable.c Show resolved Hide resolved
aux/macvendor.py Outdated Show resolved Hide resolved
AzureMarker added a commit to pi-hole/api that referenced this pull request Jan 6, 2019
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
FTL.h Outdated Show resolved Hide resolved
… this pointer. Add a callback for the update subroutine.

Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER dismissed AzureMarker’s stale review January 7, 2019 17:48

Addressed all point except for the documentation (needs to be addressed separately)

Signed-off-by: DL6ER <dl6er@dl6er.de>
aux/macvendor.py Show resolved Hide resolved
Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER dismissed AzureMarker’s stale review January 8, 2019 20:24

Addressed all point except for the documentation (needs to be addressed separately)

@AzureMarker AzureMarker closed this Jan 9, 2019
@AzureMarker AzureMarker reopened this Jan 9, 2019
@AzureMarker AzureMarker merged commit 06259b0 into development Jan 9, 2019
@AzureMarker AzureMarker deleted the new/network-details branch January 9, 2019 03:08
AzureMarker added a commit to pi-hole/api that referenced this pull request Jan 10, 2019
@DL6ER DL6ER mentioned this pull request Jan 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants