예제 #1
0
char *
ofl_queue_prop_type_to_string(uint16_t type) {
    char *str;
    size_t str_size;
    FILE *stream = open_memstream(&str, &str_size);

    ofl_queue_prop_type_print(stream, type);
    fclose(stream);
    return str;
}
예제 #2
0
void
ofl_structs_queue_prop_print(FILE *stream, struct ofl_queue_prop_header *p) {
    ofl_queue_prop_type_print(stream, p->type);

    switch(p->type) {
        case (OFPQT_MIN_RATE): {
            struct ofl_queue_prop_min_rate *pm = (struct ofl_queue_prop_min_rate *)p;

            fprintf(stream, "{rate=\"%u\"}", pm->rate);
            break;
        }
        
    }

}