drgn/contrib
Martin Liska 7b0cdcf4a5 port contrib/tcp_sock.py to v5.19+
Since Linux kernel commit cae3873c5b3a ("net: inet: Retire port only
listening_hash") (in v5.19), listening_hash is removed and we need
to iterate lhash2 table.

The script reports now:
LISTEN                                           [::]:22                                         [::]:0      /system.slice/sshd.service
LISTEN                                        0.0.0.0:22                                      0.0.0.0:0      /system.slice/sshd.service
LISTEN                                          [::1]:631                                        [::]:0      /system.slice/cups.service
LISTEN                                      127.0.0.1:25                                      0.0.0.0:0      /system.slice/postfix.service
LISTEN                                          [::1]:25                                         [::]:0      /system.slice/postfix.service
LISTEN                                      127.0.0.1:631                                     0.0.0.0:0      /system.slice/cups.service
ESTABLISHED                            192.168.122.99:22                                192.168.122.1:45906  /system.slice/sshd.service
ESTABLISHED                            192.168.122.99:22                                192.168.122.1:48066  /system.slice/sshd.service
ESTABLISHED                            192.168.122.99:22                                192.168.122.1:41128  /system.slice/sshd.service

Signed-off-by: Martin Liska <mliska@suse.cz>
2023-01-27 10:24:11 -08:00
..
cgroup.py Create contrib directory 2022-11-16 13:17:50 -08:00
fs_inodes.py fs_inodes: catch proper exception for None path 2023-01-26 08:43:16 -08:00
lsmod.py contrib: make lsmod.py handle CONFIG_MODULE_UNLOAD=n 2022-11-22 10:25:13 -08:00
mount.py add mount.py contrib script 2023-01-27 09:56:57 -08:00
ps.py enhance ps 2023-01-27 08:19:50 -08:00
README.rst Create contrib directory 2022-11-16 13:17:50 -08:00
tcp_sock.py port contrib/tcp_sock.py to v5.19+ 2023-01-27 10:24:11 -08:00

Community-Contributed Content
=============================

This directory contains drgn scripts, libraries, and notes that have been
contributed by the community but aren't considered a part of drgn proper. Code
in this directory is not tested and not necessarily up to the rest of the
project's standards.

This is intended as a central location to share drgn ideas with a low barrier
to entry. If you have time to polish your code, consider submitting it as a
proper helper or tool. If not, feel free to dump it here. Someone else might
find it useful as a starting point for their own investigation. It could even
be adapted into a helper or tool later.

Contributing to ``contrib``
---------------------------

The bar for contributing to ``contrib`` is intentionally low. Code submitted
here can be rough and will be only lightly reviewed. The only hard requirements
are:

* It must be relevant to drgn.
* All files must have a comment or docstring at the top describing what they
  are. This can be short.

There are also some boring legal requirements:

* All files must have a copyright notice.
* All files must be licensed under the LGPLv2.1+ (using
  ``SPDX-License-Identifier: LGPL-2.1-or-later``).
* All commits must have a ``Signed-off-by`` trailer. See `Signing Off
  <../CONTRIBUTING.rst#signing-off>`_.

We may choose to edit, reorganize, or drop parts your contribution. If in
doubt, go ahead and open a pull request, and we'll decide what to do with it.