I am starting to work on a lightweight OSPFv2 protocol implementation and
thought that twisted looked like a good tool to use for a lot of the state
machine and timing parts. I need to create a SOCK_RAW socket for protocol
89. Can someone point me in the right direction to get twisted to use this?
Here's a minimal example of what I need to do to receive the packets
import socket
import struct
sock = socket.socket(socket.AF_INET, socket.SOCK_RAW, 89)
sock.bind(('', 0))
multicast_group = '224.…
[View More]0.0.5'
group = socket.inet_aton(multicast_group)
mreq = struct.pack('4s4s', group, socket.inet_aton('192.168.88.253'))
sock.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
while True:
data, address = sock.recvfrom(1024)
print(data.hex())
[View Less]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
I'm energized to announce txtorcon 23.11.0 with the following changes:
* Fix test-failures on Python 3.12
* Particular GETINFO hanging (https://github.com/meejah/txtorcon/issues/389)
(ultra-long lines over 16KiB caused problems in the protocol)
* Use built-in `mock` only (https://github.com/jelly)
* Remove `incremental` (https://github.com/gdrosos)
txtorcon is an implementation of the "control-spec" for Tor using the
"Twisted" networking …
[View More]library. This is the library to use if you want
to write event-based software (including asyncio; interop is possible)
in Python that uses the Tor network as a client or a service (or to
integrate Tor support into existing Twisted-using applications).
You can download the release from PyPI or GitHub (or of
course "pip install txtorcon"):
https://pypi.python.org/pypi/txtorcon/23.11.0https://github.com/meejah/txtorcon/releases/tag/v23.11.0
Releases are also available from the hidden service:
http://fjblvrw2jrxnhtg67qpbzi45r7ofojaoo3orzykesly2j3c2m3htapid.onion/txtor…http://fjblvrw2jrxnhtg67qpbzi45r7ofojaoo3orzykesly2j3c2m3htapid.onion/txtor…
You can verify the sha256sum of both by running the following 4 lines
in a shell wherever you have the files downloaded:
cat <<EOF | sha256sum --check
c6c4f5ca5e94ed58be70de0f06d06153b7025cf4c6956b3724194a7cd8736904 dist/txtorcon-23.11.0.tar.gz
59ec801a38d6ea3cedc544cfcdb8e6f180b55d51bf9a01224b09f4bf48262f6b dist/txtorcon-23.11.0-py3-none-any.whl
EOF
thanks,
meejah
-----BEGIN PGP SIGNATURE-----
iQFFBAEBCgAvFiEEnVor1WiOy4id680/wmAoAxKAaacFAmVbDTcRHG1lZWphaEBt
ZWVqYWguY2EACgkQwmAoAxKAaafM/wgA4VdkdG6UgY7XiWQSfrjZZby5sszLJWUa
6T2x4PlHMnI6H2GvspU76n8rHwIfoi5MUIpZvqA17YnN2roPvBZYYwThczh9rhs1
2iTh4geeoBoLJyv8yokfy8gkv0AZ4tdfWa4b3AKA7yqoQ5YSK0hCji+m1jfqyY0q
P1FCTDZ2cMl8nQ0/KMxtY1Ifg2tXpQi0OXRujPIHCdqQkA5u94WS1pZZBK3qSNJE
1/20vBI38938wDk/oNapHIeyXYVoVL4DAGq0ADMwYm0syoMZx7NES0a6T3UThKMt
szmNj8YR+gwifu3/7UAEZbnAyosSgByqHPaFUu40+Z5LzlXaEnwiaA==
=bHsG
-----END PGP SIGNATURE-----
[View Less]
We've got a contribution here that the original submitter can't follow through on:
https://github.com/twisted/twisted/pull/11813
Does anyone want to branch the branch and open a new PR, and respond to Adi's feedback in the review? It shouldn't be a huge amount of work and it'd be great not to lose this contribution.
-g