def _iesubeltfsreq_(s,sid):
""" :returns: parsed tfs request subelement """
ret = s
if sid == std.EID_TFS_SUBELEMENT_TFS:
# there are one or more tclas elements folled by an option tclas
# processing element
ret = {}
while s:
eid,tlen = struct.unpack_from('=2B',s)
if eid == std.EID_TCLAS:
if not 'tclas' in ret: ret['tclas'] = []
ret['tclas'].append(_parseie_(std.EID_TCLAS,s[:tlen]))
s = s[2+tlen:]
elif eid == std.EID_TCLAS_PRO:
s['tclas-pro'] = _parseie_(std.EID_TCLAS_PRO,ret)
# could use a break here but want to make sure
# there are not hanging elements
s = s[3:]
elif sid == std.EID_TFS_SUBELEMENT_VEND:
ret = _parseie_(std.EID_VEND_SPEC,s)
return ret
# MSMT Pilot subelements Std Table 8-117
评论列表
文章目录