Skip to content
Advertisement

Tag: networking

Receive foreign UDP Broadcast with Python

I have a device in the network at 192.168.123.204 which broadcasts UDP datagrams(Artnet) as 2.168.123.204 to 2.255.255.255:6454. (The network address is 192.168.123.204 but the datagram is sent with 2.168.123.204 as source.) The address 2.255.255.255 can’t be changed (no setting for that). My Python script runs on the device 192.168.123.148. I can receive the datagrams there with wireshark: but a Python

SQLAlchemy SSL SYSCALL timeout coping mechanism

I’m using a combination of SQLAlchemy and Postgres. Once every while my database cluster replaces a failing node, circle of life I guess. I was under the impression that by configuring my engine in the following manner: my connections would be timing out on queries >30s, and my connections would timeout after trying for 10 seconds. What I’m noticing in

How to read pcapng (wireshark) files in Python?

I have a capture of some TCP packets in pcapng format and I’d like to open it in python to inspect the TCP payloads with address 192.168.1.198. I’ve only found this library: https://python-pcapng.readthedocs.io/en/latest/api/blocks.html but it does not support inspecting TCP payloads. Is there an easy way? Answer You can use python-pcapng package. First install python-pcapng package by following command. Then

Efficient way to store and forward based on 5 tuple data

I am making a Ryu application which has to keep track of network “conversations”, that is to say, the bidirectional L4 flows. The issue is that while there are many ways to do this, efficiency is a big problem. Problems: Bidirectional data must be easily looked up. For example, a naive approach might be to hash a 5 tuple and

how to turn protocol number to name with python?

the protocol like tcp and udp is all represented by a number. the above code will return 6. How I can get the protocol name if I know the protocol number? Answer I’m going to say there is almost definitely a better way then this, but all the protocol names (and values) are stored as constants prefixed by “IPPROTO_” so

Advertisement