On Thu, Apr 30, 2015 at 10:40:07PM -0700, Hao Wu wrote: > I am confused about the relationship between struct ofproto and struct > ofproto_dpif. Intuitionally, ofproto_dpif should be the datapath interface > for a certain ofproto switch, but it is not included in the struct ofproto. > On the contrary, in struct ofproto_dpif, there is a ofproto instance, not a > pointer! It seems that it is the datapath interface that contains the > ofproto switch?
ofproto is an abstract interface, and ofproto_dpif is an implementation of that abstract interface that works in terms of an underlying datapath device. The actual structure layout is similar to how a subclass of a C++ class is implemented; thus, the subclass includes an instance of the superclass. _______________________________________________ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss