def ethtype_to_str(t):
 if (t <= 1500):
  return ('802.3/%04x' % (t,))
 return _ethtype_to_str.get(t, ('%04x' % (t,)))

def ethtype_to_str ( t ) : if ( t <= 1500 ) : return ( '802.3/%04x' % ( t , ) ) return _ethtype_to_str . get ( t , ( '%04x' % ( t , ) ) )
given numeric ethernet type or length .