Skip to content

Commit

Permalink
added logs for arp table
Browse files Browse the repository at this point in the history
  • Loading branch information
git-elliot committed Sep 5, 2023
1 parent d216363 commit 0e0b7d6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/src/models/arp_table.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import 'dart:convert';
import 'dart:io';

import 'package:logging/logging.dart';
import 'package:network_tools/src/models/arp_data.dart';

class ARPTable {
static final arpLogger = Logger("arp-table-logger");
static final arpTable = <String, ARPData>{};
static bool resolved = false;

Expand All @@ -25,6 +27,7 @@ class ARPTable {
return null;
}
for (final entry in entries) {
arpLogger.fine("Found entry: $entry");
final match = pattern.firstMatch(entry);
if (match != null) {
final arpData = ARPData(
Expand All @@ -36,6 +39,7 @@ class ARPTable {
);
final key = arpData.iPAddress;
if (key != null) {
arpLogger.fine("Adding entry to table -> $entry");
arpTable[key] = arpData;
}
}
Expand Down

0 comments on commit 0e0b7d6

Please sign in to comment.