struct ofpbuf * echo_reply(enum ofputil_protocol proto) { struct ofp_header oh; memset(&oh, 0, sizeof(oh)); oh.version = ofputil_protocol_to_ofp_version(proto); oh.type = 3; // OFPT_ECHO_REPLY oh.length = htons(8); // lenght of ofp_header oh.xid = 0; return make_echo_reply(&oh); }
static void process_echo_request(struct lswitch *sw, const struct ofp_header *rq) { queue_tx(sw, make_echo_reply(rq)); }