| 1373 | } |
| 1374 | |
| 1375 | static void |
| 1376 | print_dscp(struct buf_pr *bp, const ipfw_insn_u32 *cmd) |
| 1377 | { |
| 1378 | const uint32_t *v; |
| 1379 | const char *code; |
| 1380 | int i = 0; |
| 1381 | char sep= ' '; |
| 1382 | |
| 1383 | bprintf(bp, " dscp"); |
| 1384 | v = cmd->d; |
| 1385 | while (i < 64) { |
| 1386 | if (*v & (1 << i)) { |
| 1387 | if ((code = match_value(f_ipdscp, i)) != NULL) |
| 1388 | bprintf(bp, "%c%s", sep, code); |
| 1389 | else |
| 1390 | bprintf(bp, "%c%d", sep, i); |
| 1391 | sep = ','; |
| 1392 | } |
| 1393 | |
| 1394 | if ((++i % 32) == 0) |
| 1395 | v++; |
| 1396 | } |
| 1397 | } |
| 1398 | |
| 1399 | #define insntod(cmd, type) ((const ipfw_insn_ ## type *)(cmd)) |
| 1400 | struct show_state { |
no test coverage detected