diff options
author | IWAMOTO Toshihiro <iwamoto@valinux.co.jp> | 2015-07-03 11:27:16 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-07-03 11:38:03 +0900 |
commit | 675a7dbc377d362ba5fbbe6565aab9f9718c7a65 (patch) | |
tree | 466ce1115d905ae17be59bb586de5fee0e117917 | |
parent | eff5326d47fee92d1799794c22ac1baa051b937b (diff) |
Use the asciilist type for lists of ip addresses
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/lib/packet/cfm.py | 5 | ||||
-rw-r--r-- | ryu/lib/packet/icmpv6.py | 21 | ||||
-rw-r--r-- | ryu/lib/packet/igmp.py | 16 | ||||
-rw-r--r-- | ryu/lib/packet/ipv6.py | 5 |
4 files changed, 47 insertions, 0 deletions
diff --git a/ryu/lib/packet/cfm.py b/ryu/lib/packet/cfm.py index 032c928f..0e8c2cf1 100644 --- a/ryu/lib/packet/cfm.py +++ b/ryu/lib/packet/cfm.py @@ -524,6 +524,11 @@ class link_trace_message(link_trace): _ALL_PACK_LEN = struct.calcsize(_PACK_STR) _MIN_LEN = _ALL_PACK_LEN _TLV_OFFSET = 17 + _TYPE = { + 'ascii': [ + 'ltm_orig_addr', 'ltm_targ_addr' + ] + } def __init__(self, md_lv=0, version=CFM_VERSION, use_fdb_only=1, diff --git a/ryu/lib/packet/icmpv6.py b/ryu/lib/packet/icmpv6.py index 16d55eb1..1e5eaea8 100644 --- a/ryu/lib/packet/icmpv6.py +++ b/ryu/lib/packet/icmpv6.py @@ -692,6 +692,11 @@ class mld(stringify.StringifyMixin): _PACK_STR = '!H2x16s' _MIN_LEN = struct.calcsize(_PACK_STR) + _TYPE = { + 'ascii': [ + 'address' + ] + } def __init__(self, maxresp=0, address='::'): self.maxresp = maxresp @@ -749,6 +754,14 @@ class mldv2_query(mld): _PACK_STR = '!H2x16sBBH' _MIN_LEN = struct.calcsize(_PACK_STR) + _TYPE = { + 'ascii': [ + 'address' + ], + 'asciilist': [ + 'srcs' + ] + } def __init__(self, maxresp=0, address='::', s_flg=0, qrv=2, qqic=0, num=0, srcs=None): @@ -884,6 +897,14 @@ class mldv2_report_group(stringify.StringifyMixin): """ _PACK_STR = '!BBH16s' _MIN_LEN = struct.calcsize(_PACK_STR) + _TYPE = { + 'ascii': [ + 'address' + ], + 'asciilist': [ + 'srcs' + ] + } def __init__(self, type_=0, aux_len=0, num=0, address='::', srcs=None, aux=None): diff --git a/ryu/lib/packet/igmp.py b/ryu/lib/packet/igmp.py index 8392765a..f1d65b0d 100644 --- a/ryu/lib/packet/igmp.py +++ b/ryu/lib/packet/igmp.py @@ -252,6 +252,14 @@ class igmpv3_query(igmp): _PACK_STR = '!BBH4sBBH' _MIN_LEN = struct.calcsize(_PACK_STR) MIN_LEN = _MIN_LEN + _TYPE = { + 'ascii': [ + 'address' + ], + 'asciilist': [ + 'srcs' + ] + } def __init__(self, msgtype=IGMP_TYPE_QUERY, maxresp=100, csum=0, address='0.0.0.0', s_flg=0, qrv=2, qqic=0, num=0, @@ -413,6 +421,14 @@ class igmpv3_report_group(stringify.StringifyMixin): """ _PACK_STR = '!BBH4s' _MIN_LEN = struct.calcsize(_PACK_STR) + _TYPE = { + 'ascii': [ + 'address' + ], + 'asciilist': [ + 'srcs' + ] + } def __init__(self, type_=0, aux_len=0, num=0, address='0.0.0.0', srcs=None, aux=None): diff --git a/ryu/lib/packet/ipv6.py b/ryu/lib/packet/ipv6.py index 45dfff26..6ed03187 100644 --- a/ryu/lib/packet/ipv6.py +++ b/ryu/lib/packet/ipv6.py @@ -413,6 +413,11 @@ class routing_type3(header): _PACK_STR = '!BBBBBB2x' _MIN_LEN = struct.calcsize(_PACK_STR) + _TYPE = { + 'asciilist': [ + 'adrs' + ] + } def __init__(self, nxt=inet.IPPROTO_TCP, size=0, type_=3, seg=0, cmpi=0, cmpe=0, adrs=None): |