On Fri, Oct 11, 2019 at 02:38:14PM +0700, Tuyen Dinh wrote: > I'm trying to preprocess packets that don't match flowtable before they are > sent to the controller via PacketIn message.I found in ofproto/connmgr.c, > function connmgr_send_async_msg() is given a struct ofproto_async_msg *am , > encode and send a PacketIn message to the controller. I tried to read the > source/dest ip and source/dest port of the captured packet by access > am>pin.up.base.flow_metadata.flow but all fields are 0 except in_port. Is > it the correct way to access the metadata of the captured packet? If I'm > misunderstanding, how can I get the metadata of the captured packet in user > space before it's sent to the controller?
It's not where you're looking because this isn't considered metadata. In this context, metadata is information about the packet that is not in the packet. The struct in question doesn't contain any structured representation of the data fields. If you need them, you'll have to (re-)extract them from the packet, e.g. with flow_extract(). _______________________________________________ discuss mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
