Hi all,

I have some questions about parsing a packet.

Logically, when a packet comes into the controller, first, the ethernet
header needs to be parsed,
if it can’t be deliverd in L2, then parse the IP header, and
then, TCP/UDP/ICMP header. Right?

0.from nox.lib.packet.ethernet import *ethernet*
from nox.lib.packet.ipv4 import *ipv4*
from nox.lib.packet.icmp import *icmp*

In packet_in_callback function,
1. if packet.parsed == True
learn_and_forward_l2_packet (if failed, move to step 2)

2. if packet.type == ethernet.IP_TYPE
parse the IP header (How to call the “parse” method in ipv4 class?)
learn_and_forward_l3_packet

Questions:
1. When a packet coming into the controller, by default, it would be parsed
by *ethernet *first?
2. Could you give an example how to parse a packet header by *ipv4*?

Correct me if anything wrong above.

Thank you very much. Looking forward to your reply.

Weiyun
_______________________________________________
openflow-discuss mailing list
openflow-discuss@lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/openflow-discuss

Reply via email to