ip 0.1.1 ip: ^0.1.1 copied to clipboard
A package for working with the IP protocol stack (IPv4, IPv6, ICMP, TCP, UDP).
import 'package:ip/ip.dart';
import 'package:raw/raw.dart';
void printPacketInfo(List<int> bytes) {
// Decode packet
final reader = RawReader.withBytes(bytes);
final packet = IpPacket.decode(reader);
// Print some information
print("Source: ${packet.source}");
print("Destination: ${packet.destination}");
}