Invalid packet IPV

Apr 13, 2016 at 9:18 AM
Hi everyone and thanks in advance to help me,
I had follow the wiki for send a packet https://github.com/PcapDotNet/Pcap.Net/wiki/Pcap.Net-Tutorial-Sending-Packets but I don't understand why when I create a BuildEthernetPacket, this packet is invalid.

If I copy past the wiki tutorial and I done that :
            Packet x = BuildEthernetPacket();
            Console.WriteLine(x);
            Console.WriteLine(x.IsValid);
            communicator.SendPacket(x);
Result is False


__
The original code for BuildEthernetPacket :__
    /// <summary>
    /// This function build an Ethernet with payload packet.
    /// </summary>
    private static Packet BuildEthernetPacket()
    {
        EthernetLayer ethernetLayer =
            new EthernetLayer
                {
                    Source = new MacAddress("01:01:01:01:01:01"),
                    Destination = new MacAddress("02:02:02:02:02:02"),
                    EtherType = EthernetType.IpV4,
                };

        PayloadLayer payloadLayer =
            new PayloadLayer
                {
                    Data = new Datagram(Encoding.ASCII.GetBytes("hello world")),
                };

        PacketBuilder builder = new PacketBuilder(ethernetLayer, payloadLayer);

        return builder.Build(DateTime.Now);
    }
If someone have a idea ?
Thanks
Coordinator
Apr 16, 2016 at 1:04 PM
Sep 7, 2016 at 1:59 AM
Edited Sep 7, 2016 at 2:00 AM
Yeah, I was gonna say:
PLEASE NOTE: THIS PROJECT HAS BEEN MOVED TO GITHUB
http://pcapdot.net
https://github.com/PcapDotNet/Pcap.Net
Do not file any further issues or discussions here on CodePlex.
For questions, see Pcap.Net Q&A.

Last edited Mar 17, 2015 at 12:54 AM by Brickner, version 45

... What I can't see is that question posted over there, heh. :-f