X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fofp-print.c;h=8d99844a5293a457c30b7e7e6c609eb252010d88;hb=f40869bdf6feca4d3ff7c59a1fb1f7ac101bc967;hp=b97180e6655a308a9a4574b583b835e0cdf4b34a;hpb=e1db42d68bf896116277bf8dbc162ca6b5252803;p=sliver-openvswitch.git diff --git a/lib/ofp-print.c b/lib/ofp-print.c index b97180e66..8d99844a5 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira, Inc. + * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,7 +44,6 @@ #include "openflow/openflow.h" #include "openflow/nicira-ext.h" #include "packets.h" -#include "pcap.h" #include "type-props.h" #include "unaligned.h" #include "util.h" @@ -112,6 +111,14 @@ ofp_print_packet_in(struct ds *string, const struct ofp_header *oh, ds_put_format(string, " tun_id=0x%"PRIx64, ntohll(pin.fmd.tun_id)); } + if (pin.fmd.tun_src != htonl(0)) { + ds_put_format(string, " tun_src="IP_FMT, IP_ARGS(pin.fmd.tun_src)); + } + + if (pin.fmd.tun_dst != htonl(0)) { + ds_put_format(string, " tun_dst="IP_FMT, IP_ARGS(pin.fmd.tun_dst)); + } + if (pin.fmd.metadata != htonll(0)) { ds_put_format(string, " metadata=0x%"PRIx64, ntohll(pin.fmd.metadata)); } @@ -642,6 +649,10 @@ ofp10_match_to_string(const struct ofp10_match *om, int verbosity) ds_put_cstr(&f, "arp,"); } else if (om->dl_type == htons(ETH_TYPE_RARP)){ ds_put_cstr(&f, "rarp,"); + } else if (om->dl_type == htons(ETH_TYPE_MPLS)) { + ds_put_cstr(&f, "mpls,"); + } else if (om->dl_type == htons(ETH_TYPE_MPLS_MCAST)) { + ds_put_cstr(&f, "mplsm,"); } else { skip_type = false; } @@ -1546,19 +1557,18 @@ ofp_print_role_message(struct ds *string, const struct ofp_header *oh) } ds_put_cstr(string, " role="); - if (rr.request_current_role_only) { - ds_put_cstr(string, "nochange"); - return; - } switch (rr.role) { - case NX_ROLE_OTHER: + case OFPCR12_ROLE_NOCHANGE: + ds_put_cstr(string, "nochange"); + break; + case OFPCR12_ROLE_EQUAL: ds_put_cstr(string, "equal"); /* OF 1.2 wording */ break; - case NX_ROLE_MASTER: + case OFPCR12_ROLE_MASTER: ds_put_cstr(string, "master"); break; - case NX_ROLE_SLAVE: + case OFPCR12_ROLE_SLAVE: ds_put_cstr(string, "slave"); break; default: