47,538 questions
Advice
0
votes
1
replies
11
views
What's the fastest and most reliable way to aggregate ipv4 addresses into CIDRs in Go?
I have an array of ipv4 addresses (over 750k addresses).These IPs have so long been stored in hash:ip ipset of Linux through the Go application.
I want to reduce this to shortest (if that's a good ...
-1
votes
1
answer
44
views
How to create a TCP packet bigger than 64KB and save it in a pcap file?
For purpose of testing a network device I need to create a packet bigger than 64KB and save it in a pcap file to be replayed by tests.
How can I do it? Apparently scapy can't:
from scapy.all import *
...
0
votes
0
answers
34
views
Docker fails to pull image from GHCR on AWS EC2: failed to resolve reference / timeout on https://ghcr.io/v2/ [closed]
I’m running Docker on a Linux EC2 instance and Docker is unable to pull images from GitHub Container Registry (GHCR).
When pulling the image, I get the following error:
Error failed to resolve ...
-3
votes
0
answers
32
views
will tcpdump capture packets from pod's interface if I use -any in host [closed]
If calico using veth pair, I am thinking it might be possible because there is a peer that visible from host's interface list.
But if ipvlan is used, inside pod, there is an interface like myLan, it's ...
2
votes
3
answers
77
views
Unity TCP client works on Windows but not on Android (same Wi-Fi network)
What I want to ask is this:
When running the server code in Visual Studio and the client code in Unity on Windows, the server successfully receives responses from the client.
However, when running the ...
0
votes
0
answers
39
views
Trying to get a PS script to monitor and log NIC connection drops [duplicate]
I want a simple Powershell GUI, to have the local computer let me know when any of its NICs drop connection. The results should be a .csv file, stored in a folder named NIC_Drops, located in the root ...
4
votes
1
answer
290
views
sending packet with AF_XDP socket failing, increments tx_ring_empty_descs
I'm currently trying to figure out how to use an AF_XDP socket without relying on libxdp as I want to learn how it works under the hood. I'm having an issue where the packet is seemingly getting ...
2
votes
1
answer
85
views
Handshake fails with RST after destination address modification of TCP packets in Netfilter hooks
I am implementing a destination NAT-like behavior by hooking into NF_INET_PRE_ROUTING and NF_INET_LOCAL_OUT to modify the destination IP address and recalculate the checksums.
nf_tracer_handler(void *...
3
votes
1
answer
152
views
Unexpectedly poor performance of io_uring for multiple TCP socket writes
I am looking for some guidance on using io_uring for high-fan-out TCP writes.
I have a Rust application that waits for an event in a tight loop. Whenever the event occurs, the same payload needs to be ...
Advice
0
votes
1
replies
50
views
Why is the WSL (Nat) able to reach to Vmware (Nat)?
Thank you all for reading my post in advance.
So I have my VMware Virtual machine (Nat) which is listed as below:
huang@ubuntu:~$ ip route show default
default via 192.168.189.2 dev ens33 proto ...
2
votes
1
answer
117
views
Network namespace MTU setting in C vs the 'ip' utility with big Ethernet frames
I have this Linux C project that (among others) sends (bigger than 1500 bytes) raw Ethernet frames between network interfaces of different processes. I have a bunch of system tests where this ...
Advice
0
votes
2
replies
77
views
How to make devices discover each other using WIFI
What's the best way to allow programs to discover each other on the network?
Let's say we are writing a system that tracks the usage of computers over the network.
We have an agent program that sends ...
2
votes
1
answer
60
views
Node JS AXIOS Client fail to send request to Internet
What I try that works:
npm "request" package works fine in the Node JS backend, however request is a deprecated package with security problem. I don't feel like to keep using it.
request({
...
Advice
0
votes
0
replies
46
views
nvim server to use nvim as godot editor
I am trying to use nvim as the external editor for Godot, with GDScript.
I have found a decent amounts of post explaining how to do it, so I have some idea on how to do it.
No solutions perfectly fit ...
2
votes
0
answers
120
views
Performing Peer - Peer connection with Turn server
I'm writing an application for a peer to peer service with a TURN server, but I'm struggling to construct one. If my understanding is correct, there are three steps needed for a successful peer to ...
Advice
1
vote
2
replies
89
views
Turning off buffering in k8s nginx ingress greatly increases client side latency and streaming in downstream
I have the following architecture:
Browser App (React) -> Nginx K8S Ingress -> Streaming Service A (Kotlin, POD) -> Streaming Service B (Java,POD)
From the browser I upload a json array of ...
-4
votes
1
answer
94
views
Code says 'pkt' is not defined but the tutorial I'm following doesn’t have this issue [closed]
I'm working on a project about VPN tunneling, I've been following along with this example (https://www.youtube.com/watch?v=t_VmiXNWKkk&list=WL&index=2&pp=gAQBiAQB). The guy demonstrates ...
2
votes
1
answer
76
views
Parsing MySQL Client Handshake response message
I'm trying to parse the Handshake response packet from MySQL client/server protocol
For the task I'm connecting to the application via mysql cli client:
mysql --version
mysql Ver 9.5.0 for macos15.4 ...
2
votes
2
answers
111
views
Database connection failing as soon as the parent ssh shell is terminated, even though I backgrounded and disowned
Alright, so bear with me. This took me an entire day to dig into.
what I'm doing
I'm running a C program on a remote host over SSH. The program calls a local redis database IP and port and also 8.8.8....
0
votes
0
answers
79
views
Android: Video streaming in WebView not working on certain devices (Yacine TV APK)
I am developing an Android app similar to Yacine TV that streams video content using a WebView. However, on some devices running Android 12 and 13, the video player shows a black screen while the ...
0
votes
0
answers
91
views
How to disable automatic radiotap header insertion in raw sockets?
I’m working on a tool using raw system sockets.
The tool needs to send packets with low-level protocols such as IEEE 802.1X.
When I inspect the packets in Wireshark, I notice that the radiotap header ...
Advice
1
vote
1
replies
75
views
Why don't we use HTTP for everything instead of SMTP?
We can fully emulate SMTP with current technology. Clearly, I can send a JSON containing the title, the body, and any other email information. The forwarding and replying mechanism can just be regular ...
0
votes
1
answer
83
views
WriteFile failure when networkshare is disconnected
I have a win32 app opening a log file on a network share using CreateFile and WriteFile (non overlapped) to write records. What I am seeing when the network share is lost, WriteFile reports an error (...
Advice
0
votes
6
replies
216
views
The feasibility of creating a small-scope 3D multiplayer game using C and Vulkan
I come seeking advice.
I'm attempting to make a game with C and Vulkan (no engine). It will be low scope. It has a low-mid poly aesthetic, fairly involved mechanics, and will be multiplayer, ...
2
votes
1
answer
132
views
Sending raw packets back to host's networking stack
I'm writing a TCP/IP stack for embedded systems, but I wanted to test it on my host system.
Originally I tried with tap0 + a bridge. But I quickly realized it would make the most sense to bind to the ...
0
votes
0
answers
75
views
Socket TCP connection through Radmin (can't connect) in Console Application
I made a simple console messenger to test the possibility of connecting 2 or more computers for my game using RadminVpn+Sockets but its not working. I can connect to myself using my radmin ip but if I ...
0
votes
0
answers
81
views
How can I capture and inspect outgoing HTTP requests from a Flutter WebView or video player?
I'm developing a Flutter app that loads a web page containing an embedded video player.
When the page loads, the browser internally makes several HTTP requests (for example, .m3u8 or .ts files), but I ...
0
votes
0
answers
46
views
How to achieve complete read/write thread separation for BoringSSL using BIO APIs
I'm integrating BoringSSL into my networking library for secure communication. I've observed that both SSL_read() and SSL_write() operations can potentially trigger both read and write activities on ...
3
votes
2
answers
227
views
How to make system proxy settings apply to HttpClient.GetAsync() without restarting Windows?
We use the following function to test internet connectivity every 5 seconds. But in some part of the world, this function always returns false. Now, the problem is we can set a proxy server in Windows ...
0
votes
0
answers
81
views
C++ pcap ARP Spoofing Packet Issue: IP/MAC Addresses Not Recognized
I am working on an ARP spoofing project using C++ and the WinPcap library. I have an issue where two seemingly identical methods of constructing the ARP packet result in different behaviors in ...
0
votes
0
answers
85
views
Can a process read/write a TAP device file descriptor after changing network namespaces?
I am working on a C++ program on Linux that involves interacting with network namespaces (netns) and a TAP device.
My procedure is as follows:
My process starts in an initial network namespace (e.g., ...
1
vote
0
answers
29
views
Reusing socket which failed to connect with timeout seems bad - is it documented somewhere? [duplicate]
Briefly: is the requirement to re-create TCP socket after it failed (e.g. on timeout) documented in some official manual, guide etc?
In details:
Some code I stuck upon is faulty in the following way:
...
-1
votes
1
answer
89
views
Seastar: per-shard TCP listeners not binding or exiting silently on non-0 shards
I’m trying to start a per-shard TCP listener in Seastar, where each shard binds to its own port (6010 + shard_id). On shard 0, everything works — the listener binds and accepts connections fine. But ...
0
votes
0
answers
108
views
MQL5 SocketConnect fails with error 4014 connecting to local TCP server
I’m developing an MQL5 Expert Advisor that should connect to a local TCP server (127.0.0.1:5001).
The server is running and responds correctly to Telnet.
In MetaTrader, I added 127.0.0.1:5001 in ...
0
votes
1
answer
205
views
Decrypting data from stream without knowing data size
Assuming we know the key and the IV for the data we're getting from the stream, is it possible to decrypt it within stream? I encrypted the same message three times and then decrypted it all at once, ...
0
votes
1
answer
55
views
How to connect to Dask Gateway Server from inside a Docker container?
I have a method that connects my app to a Dask Gateway Server
def set_up_dask(dashboard=False, num_workers=4, min_workers=4, max_workers=50):
gateway = Gateway("http://127.0.0.1:8000")
...
3
votes
1
answer
212
views
Understanding socket() function args
I need to use socket() but the args given to the function make me confused.
I have to do an school exercice where I have to use socket for intercept ethernet frame (more specifically arp spoofing).
...
0
votes
0
answers
125
views
My transparent TCP/UDP proxy with NFQUEUE + WinDivert dont work
I have a transparent proxy that works by spoofing addresses and ports, but for some reason it's not working. On a Debian 12 amd64 server, I used iptables -t mangle -A PREROUTING -j NFQUEUE --queue-num ...
0
votes
0
answers
110
views
How to identify which CRC-16 variant is used in this binary protocol?
I'm analyzing a binary protocol captured via IRP_MJ_READ. Each message is 11 bytes, and I suspect the last 2 bytes are a CRC-16 value.Here’s an example of the message in hex:
00 02 c1 00 10 00 00 00 ...
1
vote
1
answer
165
views
Get tap device mac address
I'm creating a tap device using the tun/tap interface by opening /dev/net/tun. However, when I try to get the MAC address using the SIOCGIFHWADDR ioctl call I get the wrong MAC address. If I make the ...
1
vote
0
answers
153
views
Enable GSO on Ubuntu 22.04 LTS
I’m working with a Linux TUN device (MTU 65535) where I write jumbo TCP packets (10KB+), and my goal is for the kernel (via software GSO) or the NIC (via TSO if available) to segment them into MTU-...
0
votes
1
answer
141
views
Intermittent `java.net.SocketException: Broken pipe` during Android Multipart Upload - Client-Side Stream Corruption or Premature Close?
I'm grappling with a highly intermittent java.net.SocketException: Broken pipe error while uploading multiple images from my developemnt Android app using HttpURLConnection to a production Java server....
2
votes
1
answer
138
views
How to Shutdown the server using poll() Gracefully
I have written a database server and client, and i'm using a poll loop
#include <stdio.h>
#include <stdbool.h>
#include <getopt.h>
#include <stdlib.h>
#include <stdlib.h>
...
3
votes
1
answer
143
views
Why does recvfrom() constantly output -1 in my code?
I'm practicing in networking programming. Currently I'm trying to make a program that crafts a single ARP packet and receives the response. Further, I want to expand it to handle the whole subnet.
But,...
2
votes
0
answers
206
views
How do I connect to my own C server from another machine on same network? [closed]
I can connect a Unix server and client socket just fine, but only if they are on the same machine.
My code does not work even if they are running on separate machines connected to the same router.
To ...
0
votes
1
answer
108
views
Get IP address of interface as a 32-bit integer
I am trying to extract the IP address of a Linux interface as a 32 bit integer.
Similar to this question:
Get IP address of an interface on Linux
but unfortunately this question extracts it as a ...
1
vote
0
answers
270
views
UdpSocket drops packets with low read_timeout
I'm using Rust's std UdpSocket to send data from one socket to another one locally.
It all works fine if I set no read timeout or if I set a "big" read timeout like 10ms. Once I set the ...
1
vote
0
answers
62
views
Kernel module fails to compile with 'undefined symbol: fib_get_table' despite function being present
I'm writing a Linux kernel module that prints the routing tables using dmesg. To do this, I'm trying to use the fib_get_table function to access FIB (Forwarding Information Base) tables.
Here’s a ...
0
votes
0
answers
157
views
netsh int ip reset Errors during Reset of Network adapters
Tried to run this script in application env and just commands on their own in terminal.
public resetNetworkAdapter(): void {
// windows reported everything is OK for most of adapters,
// but ...
0
votes
0
answers
124
views
TimeoutError occured when using wandb.init
I used wandb.init and resulted in the error below.
wandb: Currently logged in as: MyWandbAccount (accountname) to https://api.wandb.ai. Use `wandb login --relogin` to force relogin
wandb: ERROR Run ...