[pox-dev] Altering DNS packet payload
Murphy McCauley
murphy.mccauley at gmail.com
Fri Dec 20 11:53:45 PST 2013
I think you should be able to alter the one you got and then re-pack it. Something like:
eth = event.parsed
p = eth.find('dns')
p.answers[0].rddata = IPAddr('10.0.0.1')
data = eth.pack() # Suitable for being sent
-- Murphy
On Dec 20, 2013, at 8:36 AM, Curtis Taylor <yamahabob28 at gmail.com> wrote:
> Hello,
>
> I’m wanting to alter a DNS response. I have the switch configured to send
> all DNS response packets to the POX controller. Is my only option to
> construct a DNS packet from scratch and send it or can I alter the packet
> sent from the switch and recompute the checksum? Or to use pack/unpack on
> packet_in.data?
>
> I want to do something like:
>
> p = event.parsed.find('dns')
> p.answers[0].rddata='10.0.0.1'
>
>
>
> Cheers,
> Curtis
More information about the pox-dev
mailing list