of_object_t *
of_list_meter_stats_new(of_version_t version)
{
    of_object_t *obj;
    int bytes;

    bytes = of_object_fixed_len[version][OF_LIST_METER_STATS];

    if ((obj = of_object_new(OF_WIRE_BUFFER_MAX_LENGTH)) == NULL) {
        return NULL;
    }

    of_list_meter_stats_init(obj, version, bytes, 0);

    return obj;
}
of_list_meter_stats_t *
of_list_meter_stats_new(of_version_t version)
{
    of_list_meter_stats_t *obj;
    int bytes;

    bytes = of_object_fixed_len[version][OF_LIST_METER_STATS] + of_object_extra_len[version][OF_LIST_METER_STATS];

    /* Allocate a maximum-length wire buffer assuming we'll be appending to it. */
    if ((obj = (of_list_meter_stats_t *)of_object_new(OF_WIRE_BUFFER_MAX_LENGTH)) == NULL) {
        return NULL;
    }

    of_list_meter_stats_init(obj, version, bytes, 0);

    return obj;
}