Skip to content

Commit

Permalink
Merge pull request #168 from guyluz11/dev
Browse files Browse the repository at this point in the history
Exposed tcpSrvRecordsList udpSrvRecordsList for network_tools_flutter
  • Loading branch information
git-elliot authored Dec 30, 2023
2 parents c0d7002 + ba7e206 commit 8c480b5
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 20 deletions.
1 change: 1 addition & 0 deletions lib/network_tools.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import 'package:network_tools/src/services/arp_service.dart';
export 'src/device_info/net_interface.dart';
export 'src/device_info/vendor_table.dart';
export 'src/host_scanner.dart';
export 'src/mdns_scanner/list_of_srv_records.dart';
export 'src/mdns_scanner/mdns_scanner.dart';
export 'src/models/active_host.dart';
export 'src/models/arp_data.dart';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/device_info/arp_table_helper.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'dart:convert';
import 'dart:io';

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

class ARPTableHelper {
static final arpLogger = Logger("arp-table-logger");
Expand Down
2 changes: 1 addition & 1 deletion lib/src/device_info/net_interface.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'dart:io';
import 'package:universal_io/io.dart';

class NetInterface {
NetInterface({
Expand Down
2 changes: 1 addition & 1 deletion lib/src/device_info/vendor_table.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import 'dart:convert';
import 'dart:io';

import 'package:csv/csv.dart';
import 'package:http/http.dart' as http;
import 'package:network_tools/network_tools.dart';
import 'package:network_tools/src/network_tools_utils.dart';
import 'package:path/path.dart' as p;
import 'package:universal_io/io.dart';

class VendorTable {
static Map<dynamic, dynamic> _vendorTableMap = {};
Expand Down
1 change: 0 additions & 1 deletion lib/src/mdns_scanner/mdns_scanner.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:multicast_dns/multicast_dns.dart';
import 'package:network_tools/network_tools.dart';
import 'package:network_tools/src/mdns_scanner/get_srv_list_by_os/srv_list.dart';
import 'package:network_tools/src/mdns_scanner/list_of_srv_records.dart';
import 'package:network_tools/src/network_tools_utils.dart';
import 'package:universal_io/io.dart';

Expand Down
3 changes: 1 addition & 2 deletions lib/src/models/active_host.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ final _getIt = GetIt.instance;

/// ActiveHost which implements comparable
/// By default sort by hostId ascending
class ActiveHost extends Comparable<ActiveHost> {
class ActiveHost {
ActiveHost({
required this.internetAddress,
this.openPorts = const [],
Expand Down Expand Up @@ -219,7 +219,6 @@ class ActiveHost extends Comparable<ActiveHost> {
@override
bool operator ==(Object o) => o is ActiveHost && address == o.address;

@override
int compareTo(ActiveHost other) {
return hostId.compareTo(other.hostId);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/src/models/arp_data.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'dart:io';
import 'package:json_annotation/json_annotation.dart';
import 'package:universal_io/io.dart';

part 'arp_data.g.dart';

Expand Down
4 changes: 2 additions & 2 deletions lib/src/models/open_port.dart
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import 'package:json_annotation/json_annotation.dart';

part 'open_port.g.dart';

/// Represents open port for a target Address
@JsonSerializable()
class OpenPort extends Comparable<OpenPort> {
class OpenPort {
OpenPort(this.port, {this.isOpen = true});
factory OpenPort.fromJson(Map<String, dynamic> json) =>
_$OpenPortFromJson(json);

final int port;
final bool isOpen;

@override
int compareTo(OpenPort other) {
return port.compareTo(other.port);
}
Expand Down
22 changes: 11 additions & 11 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ issue_tracker: https://github.com/osociety/network_tools/issues
repository: https://github.com/osociety/network_tools

environment:
sdk: ">=2.17.6 <4.0.0"
sdk: ">=3.2.0 <4.0.0"

topics:
- network
Expand All @@ -20,36 +20,36 @@ funding:

dependencies:
# A dart csv to list converter.
csv: ^5.0.2
csv: ^5.1.1
# Multi-platform network ping utility.
dart_ping: ^9.0.0
dart_ping: ^9.0.1
# Defines the annotations used by json_serializable
get_it: ^7.6.0
get_it: ^7.6.4
# A composable, Future-based library for making HTTP requests.
http: ^1.1.0
http: ^1.1.2
# Injectable is a convenient code generator for get_it.
injectable: ^2.2.0
injectable: ^2.3.2
# Defines the annotations used by json_serializable.
json_annotation: ^4.8.1
# Debugging and error logging.
logging: ^1.2.0
# Performing mDNS queries (e.g. Bonjour, Avahi).
multicast_dns: ^0.3.2+2
multicast_dns: ^0.3.2+6
# A comprehensive, cross-platform path manipulation library for Dart.
path: ^1.8.3
# Process run helpers
process_run: ^0.13.1
process_run: ^0.13.3+1
# Yet another NoSQL persistent store database solution for single process io apps.
sembast: ^3.5.0+1
# Cross-platform 'dart:io' that works in all platforms.
universal_io: ^2.0.4
universal_io: ^2.2.2


dev_dependencies:
# Standalone generator and watcher for Dart
build_runner: ^2.4.6
build_runner: ^2.4.7
# A generator for injectable library.
injectable_generator: ^2.4.0
injectable_generator: ^2.4.1
# Provides Dart Build System builders for handling JSON.
json_serializable: ^6.7.1
# Set of lint rules for Dart.
Expand Down

0 comments on commit 8c480b5

Please sign in to comment.