--- /dev/null
+#!/usr/bin/perl
+use warnings;
+use strict;
+
+use Test::More tests => 4;
+
+use_ok 'IO::Socket::INET';
+use Data::Dump qw(dump);
+
+our $sock = IO::Socket::INET->new(
+ Proto => 'udp',
+ Broadcast => 1,
+ PeerPort => 67,
+ LocalPort => 68,
+ PeerAddr => '255.255.255.255',
+ ReuseAddr => 1,
+) or die "need root priviledges to run: $!";
+
+foreach my $hex_dump ( glob 't/dhcp/*' ) {
+ ok( open(my $fh, '<', $hex_dump), "open $hex_dump" );
+ local $/ = undef;
+ ok( my $hex = <$fh>, 'slurp' );
+
+ diag "hex: ",dump $hex;
+ my $packet = pack 'H*', $hex;
+ diag "packet: ", dump $packet;
+
+ ok( $sock->send($packet), 'send' );
+
+}