docs: def list_contrib(name=None, ret=False, _debug=False):
      """Show the list of all existing contribs.
      Params:
       - name: filter to search the contribs
       - ret: whether the function should return a dict instead of printing it
      """
      # _debug: checks that all contrib modules have correctly defined:
      # # scapy.contrib.description = [...]
      # # scapy.contrib.status = [...]
      # # scapy.contrib.name = [...] (optional)
      # or set the flag:
      # # scapy.contrib.description = skip
      # to skip the file
      if name is None:
          name = "*.py"
      elif "*" not in name and "?" not in name and not name.endswith(".py"):
          name += ".py"
      results = []
      dir_path = os.path.join(os.path.dirname(__file__), "contrib")
      if sys.version_info >= (3, 5):
          name = os.path.join(dir_path, "**", name)
          iterator = glob.iglob(name, recursive=True)
      else:
          name = os.path.join(dir_path, name)
          iterator = glob.iglob(name)
      for f in iterator:
          mod = f.replace(os.path.sep, ".").partition("contrib.")[2]
          if mod.startswith("__"):
              continue
          if mod.endswith(".py"):
              mod = mod[:-3]
          desc = {"description": None, "status": None, "name": mod}
          for l in io.open(f, errors="replace"):
              if l[0] != "#":
                  continue
              p = l.find("scapy.contrib.")
              if p >= 0:
                  p += 14
                  q = l.find("=", p)
                  key = l[p:q].strip()
                  value = l[q + 1:].strip()
                  desc[key] = value
              if desc["status"] == "skip":
                  break
              if desc["description"] and desc["status"]:
                  results.append(desc)
                  break
          if _debug:
              if desc["status"] == "skip":
                  pass
              elif not desc["description"] or not desc["status"]:
                  raise Scapy_Exception("Module %s is missing its "
                                        "contrib infos !" % mod)
      results.sort(key=lambda x: x["name"])
      if ret:
          return results
      else:
          for desc in results:
              print("%(name)-20s: %(description)-40s status=%(status)s" % desc)