This project is read-only.

handcrafted packet

Jul 11, 2013 at 11:27 AM
Hi all,

I have a question about how to make a handcrafted packet. Below is the example code.

EthernetLayer ethernetLayer =
            new EthernetLayer
                Source = new MacAddress(HostMacAddress),
                Destination = new MacAddress(DestMacAddress),
                EtherType = EthernetType.IpV4,                    
I want set the EtherType property as my own protocol, but I don't know how to do this.
Dose anyone know how can I do?

For example,
Instead of the enum of EthernetLayer, EtherType = "0912"

Thanks for your help in advance.
Jul 19, 2013 at 6:56 AM
Hi AllenSiao,

I think you can just use whatever integer value you want and cast it to EthernetType.

Jul 19, 2013 at 11:30 AM
Hi Brickner,

Thanks for your suggestion.
I have solved this problem, but I used library.
Anyway, thanks a lot.