ip 0.1.0

  • README.md
  • Example
  • Installing
  • Versions
  • 60

Introduction #

A Dart package for working with the IP protocol stack. Licensed under the MIT License.

Features #

Encodes and decodes:

  • IPv4
  • IPv6
  • ICMP
  • TCP
  • UDP

example/ip.dart

import 'package:ip/ip.dart';
import 'package:raw/raw.dart';

void printPacketInfo(List<int> bytes) {
  // Decode packet
  final reader = new RawReader.withBytes(bytes);
  final packet = IpPacket.decode(reader);

  // Print some information
  print("Source: ${packet.source}");
  print("Destination: ${packet.destination}");
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  ip: ^0.1.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:ip/ip.dart';
  
Version Uploaded Documentation Archive
0.1.0 Feb 19, 2019 Go to the documentation of ip 0.1.0 Download ip 0.1.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
29
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
60
Learn more about scoring.

We analyzed this package on Mar 6, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.2.0
  • pana: 0.12.14

Platforms

Detected platforms: Flutter, other

Primary library: package:ip/ip.dart with components: io.

Health suggestions

Fix lib/src/ip/ip6_address.dart. (-1 points)

Analysis of lib/src/ip/ip6_address.dart reported 2 hints:

line 79 col 9: Don't explicitly initialize variables to null.

line 83 col 9: Don't explicitly initialize variables to null.

Maintenance issues and suggestions

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
http ^0.12.0 0.12.0+1
meta ^1.0.0 1.1.7
raw ^0.2.0 0.2.0
universal_io ^0.1.1 0.1.1
Transitive dependencies
async 2.0.8
charcode 1.1.2
collection 1.14.11
fixnum 0.10.9
http_parser 3.1.3
matcher 0.12.4
path 1.6.2
source_span 1.5.5
stack_trace 1.9.3
stream_channel 1.6.8
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
pedantic ^1.0.0
test ^1.4.0