Esempio n. 1
0
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);
}
Esempio n. 2
0
static void
process_echo_request(struct lswitch *sw, const struct ofp_header *rq)
{
    queue_tx(sw, make_echo_reply(rq));
}