int ofl_exp_msg_pack(struct ofl_msg_experimenter *msg, uint8_t **buf, size_t *buf_len) { switch (msg->experimenter_id) { case (OPENFLOW_ACCTON_ID): case (OPENFLOW_VENDOR_ID): { return ofl_exp_openflow_msg_pack(msg, buf, buf_len); } default: { OFL_LOG_WARN(LOG_MODULE, "Trying to pack unknown EXPERIMENTER message (%u).", msg->experimenter_id); return -1; } } }
int ofl_exp_msg_pack(struct ofl_msg_experimenter const *msg, uint8_t **buf, size_t *buf_len, struct ofl_exp const *exp) { switch (msg->experimenter_id) { case (OPENFLOW_VENDOR_ID): { return ofl_exp_openflow_msg_pack(msg, buf, buf_len); } case (NX_VENDOR_ID): { return ofl_exp_nicira_msg_pack(msg, buf, buf_len); } case (BEBA_VENDOR_ID): { return ofl_exp_beba_msg_pack(msg, buf, buf_len, exp); } default: { OFL_LOG_WARN(LOG_MODULE, "Trying to pack unknown EXPERIMENTER message (%u).", msg->experimenter_id); return -1; } } }
int ofl_exp_msg_pack(struct ofl_msg_experimenter *msg, uint8_t **buf, size_t *buf_len) { switch (msg->experimenter_id) { case (OPENFLOW_VENDOR_ID): { return ofl_exp_openflow_msg_pack(msg, buf, buf_len); } /* Acrescentada pelo FRESDWN case (NX_VENDOR_ID): { return ofl_exp_nicira_msg_pack(msg, buf, buf_len); } */ case (NX_VENDOR_ID): { return ofl_exp_nicira_msg_pack(msg, buf, buf_len); } case (FRESDWN_VENDOR_ID): { return ofl_exp_fresdwn_msg_pack(msg, buf, buf_len); } default: { OFL_LOG_WARN(LOG_MODULE, "Trying to pack unknown EXPERIMENTER message (%u).", msg->experimenter_id); return -1; } } }