On Fri, 16 Aug 2013 15:29:22 +0900
YAMAMOTO Takashi <yamam...@valinux.co.jp> wrote:

> Signed-off-by: YAMAMOTO Takashi <yamam...@valinux.co.jp>
> ---
>  ryu/ofproto/ofproto_v1_0_parser.py | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/ryu/ofproto/ofproto_v1_0_parser.py 
> b/ryu/ofproto/ofproto_v1_0_parser.py
> index 3fae86d..e1951c8 100644
> --- a/ryu/ofproto/ofproto_v1_0_parser.py
> +++ b/ryu/ofproto/ofproto_v1_0_parser.py
> @@ -18,6 +18,7 @@ import struct
>  import binascii
>  
>  from ofproto_parser import StringifyMixin, MsgBase, msg_pack_into, 
> msg_str_attr
> +from ryu.lib import addrconv
>  from ryu.lib import mac
>  from . import ofproto_parser
>  from . import ofproto_v1_0
> @@ -86,6 +87,9 @@ class OFPPhyPort(ofproto_parser.namedtuple('OFPPhyPort', (
>      def parser(cls, buf, offset):
>          port = struct.unpack_from(ofproto_v1_0.OFP_PHY_PORT_PACK_STR,
>                                    buf, offset)
> +        i = cls._fields.index('hw_addr')
> +        port = list(port)
> +        port[i] = addrconv.mac.bin_to_text(port[i])
>          return cls(*port)

Can we use unicode type here? Then _encode_value() in stringfy.py just
converts unicode to utf-8? Why _encode_value() in stringfy.py uses
be64 for unicode?

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to