X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fvconn.c;h=6af60e7e847dee67c0a753fa85024ee4e24c00d4;hb=bebf175930564a8eafdb63a0ad69df17d70ada18;hp=1fa83faeaedefcc71387a7c71f7bb3b0b2b96e43;hpb=88df6edbfaa4d4943e9f74f79973225c1c53297f;p=openvswitch diff --git a/lib/vconn.c b/lib/vconn.c index 1fa83fae..6af60e7e 100644 --- a/lib/vconn.c +++ b/lib/vconn.c @@ -440,6 +440,20 @@ make_buffered_packet_out(uint32_t buffer_id, return out; } +/* Creates and returns an OFPT_ECHO_REQUEST message with an empty payload. */ +struct buffer * +make_echo_request(void) +{ + struct ofp_header *rq; + struct buffer *out = buffer_new(sizeof *rq); + rq = buffer_put_uninit(out, sizeof *rq); + rq->version = OFP_VERSION; + rq->type = OFPT_ECHO_REQUEST; + rq->length = htons(sizeof *rq); + rq->xid = 0; + return out; +} + /* Creates and returns an OFPT_ECHO_REPLY message matching the * OFPT_ECHO_REQUEST message in 'rq'. */ struct buffer *