lemontree55 / packetgen

Ruby library to easily generate and capture network packets
MIT License
98 stars 13 forks source link

make #recalc within #to_w #63

Closed KINGSABRI closed 7 years ago

KINGSABRI commented 7 years ago

Hello there, the title says it all Why do we need to call recalc manually? we can make it called by default or add it as an option to to_w in case someone want to send it without calculation(no idea when someone needs that) to be something like

pkt.to_w(iface, recalc: false)

Also, I hope we can add number of packets to be sent

pkt.to_w(iface, interval: 1000)
sdaubert commented 7 years ago

calc should be done manually to allow sending erroneous packets on network. This is used, by example, to test or stress network devices.

I may add recalc option to #to_w, but its default value will be false to keep compatibility.

About number of packet : OK, but we need the number of packet to send and an interval between them (with a default value for the latter)

KINGSABRI commented 7 years ago

I may add recalc option to #to_w, but its default value will be false to keep compatibility.

Agreed, that's a good solution

About number of packet : OK, but we need the number of packet to send and an interval between them (with a default value for the latter)

defaults: number of packet: 1, interval: 0