lib/ofp-msgs.c
/* Determines the OFPTYPE_* type of the OpenFlow message in 'msg', which starts
 * at 'msg->data' and has length 'msg->size' bytes.  On success,
 * returns 0 and stores the type into '*typep'.  On failure, returns an
 * OFPERR_* error code and zeros '*typep'.
 *
 * This function checks that the message has a valid length for its particular
 * type of message, and returns an error if not.
 *
 * In addition to setting '*typep', this function pulls off the OpenFlow header
 * (including the stats headers, vendor header, and any subtype header) with
 * ofpbuf_pull().  It also sets 'msg->header' to the start of the OpenFlow
 * header and 'msg->msg' just beyond the headers (that is, to the final value
 * of msg->data). */


This function checks that the message has a valid length for its particular
type of message, and returns an error if not.

In addition to setting '*typep', this function pulls off the OpenFlow header
(including the stats headers, vendor header, and any subtype header) with
ofpbuf_pull().  It also sets 'msg->header' to the start of the OpenFlow
header and 'msg->msg' just beyond the headers (that is, to the final value
of msg->data).
This function checks that the message has a valid length for its particular type of message and returns an error if not . In addition to setting ' * typep ' this function pulls off the OpenFlow header ( including the stats headers vendor header and any subtype header ) with ofpbuf_pull () . It also sets ' msg - > header ' to the start of the OpenFlow header and ' msg - > msg ' just beyond the headers ( that is to the final value of msg - > data ) .
enum ofperr
ofptype_pull(enum ofptype *typep, struct ofpbuf *buf)
{
    enum ofperr error;
    enum ofpraw raw;
    error = ofpraw_pull(&raw, buf);
    *typep = error ? 0 : ofptype_from_ofpraw(raw);
    return error;
}
enum ofperr ofptype_pull ( enum ofptype * typep , struct ofpbuf * buf ) { enum ofperr error ; enum ofpraw raw ; error = ofpraw_pull ( & raw , buf ) ; * typep = error ? 0 : ofptype_from_ofpraw ( raw ) ; return error ; }
Determines the OFPTYPE_* type of the OpenFlow message in 'msg', which starts
 at 'msg->data' and has length 'msg->size' bytes.
Determines the OFPTYPE_ * type of the OpenFlow message in ' msg ' which starts at ' msg - > data ' and has length ' msg - > size ' bytes .