lib/ofp-prop.c
/* Attempts to parse 'property' as a property containing a 16-bit value.  If
 * successful, stores the value into '*value' and returns 0; otherwise returns
 * an OpenFlow error. */
Attempts to parse 'property' as a property containing a 16-bit value.  If
successful, stores the value into '*value' and returns 0; otherwise returns
an OpenFlow error.
Attempts to parse ' property ' as a property containing a 16 - bit value . If successful stores the value into ' * value ' and returns 0 ; otherwise returns an OpenFlow error .
enum ofperr
ofpprop_parse_u16(const struct ofpbuf *property, uint16_t *value)
{
    ovs_be16 *p = property->msg;
    if (ofpbuf_msgsize(property) < sizeof *p) {
        return OFPERR_OFPBPC_BAD_LEN;
    }
    *value = ntohs(*p);
    return 0;
}
enum ofperr ofpprop_parse_u16 ( const struct ofpbuf * property , uint16_t * value ) { ovs_be16 * p = property -> msg ; if ( ofpbuf_msgsize ( property ) < sizeof * p ) { return OFPERR_OFPBPC_BAD_LEN ; } * value = ntohs ( * p ) ; return 0 ; }
Attempts to parse 'property' as a property containing a 16-bit value.
Attempts to parse ' property ' as a property containing a 16 - bit value .
/* OpenFlow uses 8-byte properties for 16-bit values, which doesn't really
     * make sense.  Be forgiving by allowing any size payload as long as it's
     * at least big enough.  */