- } else if (raw == OFPRAW_OFPT14_SET_ASYNC ||
- raw == OFPRAW_OFPT14_GET_ASYNC_REPLY) {
- struct ofputil_async_cfg basis = OFPUTIL_ASYNC_CFG_INIT;
- struct ofputil_async_cfg ac;
-
- bool is_reply = raw == OFPRAW_OFPT14_GET_ASYNC_REPLY;
- enum ofperr error = ofputil_decode_set_async_config(oh, is_reply,
- &basis, &ac);
- if (error) {
- ofp_print_error(string, error);
- return;
- }
-
- for (i = 0; i < 2; i++) {
- ds_put_format(string, "\n %s:\n", i == 0 ? "master" : "slave");
- for (uint32_t type = 0; type < OAM_N_TYPES; type++) {
- ds_put_format(string, "%16s:",
- ofputil_async_msg_type_to_string(type));
-
- uint32_t role = i == 0 ? ac.master[type] : ac.slave[type];
- for (j = 0; j < 32; j++) {
- if (role & (1u << j)) {
- char reasonbuf[OFP_ASYNC_CONFIG_REASON_BUFSIZE];
- const char *reason;
-
- reason = ofp_async_config_reason_to_string(j, type,
- reasonbuf,
- sizeof reasonbuf);
- ds_put_format(string, " %s", reason);
- }
- }
- if (!role) {
- ds_put_cstr(string, " (off)");
- }
- ds_put_char(string, '\n');
- }
- }