All Questions
8,753
questions
1
vote
0
answers
38
views
Unable to access server running in k8s pod from WSL host with docker-desktop installation
I'm running docker-desktop with WSL2.0 ubuntu on windows. I created a k8s deployment in the wsl ubuntu host. The deployment has one pod where I'm running a simple server program(runs forever, accepts ...
0
votes
0
answers
31
views
Use C socketpair [closed]
I try to write test for a function which reads from socket, preferably using one process. To simulate a sender, I plan to use socketpair, but the following code does not work.
#include <stdio.h>
...
1
vote
0
answers
61
views
Do ebtables rules apply to RAW sockets?
Consider that I'm developing a C program utilizing AFPACKET RAW Sockets:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <arpa/inet.h&...
0
votes
1
answer
103
views
HTTP persistent connection with poll()
On successfully creating the listening socket, I try to run a block of code on it that should maintain a persistent connection. Here is what I have done so far:
while(1) {
struct pollfd pfds[1];
...
1
vote
0
answers
110
views
Linux kernel networking does not pass packet with IP router alert option to the proper socket
I am new to the world of Linux kernel networking domain and facing some issue related to the handling of IP packets that have the IP router alert option present in their options section.
I am working ...
0
votes
0
answers
87
views
Does connect syscall lead to undefined behavior when using nonblocking sockets?
I’m experiencing a very weird behavior in an SSH-like program I’m writing in C for Linux.
Code Overview
The code is completely nonblocking and designed as a reactor where all fds are registered to a ...
2
votes
0
answers
35
views
Directing Packets further in the Network Stack from UMEM
I've been following the xdp-tutorial on GitHub to learn about eBPF and AF_XDP. I've encountered an issue while following the tutorial: https://github.com/xdp-project/xdp-tutorial/tree/master/...
0
votes
1
answer
77
views
Is this a bug in Linux sockets? Receiving an extra IP header in a RAW udp socket
I created a RAW socket with the UDP protocol, sent a packet consisting of a UDP header and data, everything is fine in the PP, the packet is correct.
I also created the same socket in another program, ...
1
vote
0
answers
72
views
How to manage responses from multiple measuring devices to a single TCP/IP port for time sensitive applications?
I am very new to Socket programming, and I would appreciate any input you have in my question.
I am a physicist working on a project where the time intervals and coincidence of measurements play a big ...
0
votes
1
answer
73
views
Simple HTTP server not writing answer to client
I am writing a simple HTTP server in C from the CodeCrafter challenge Build your Own HTTP server. The request i am addressing is the following:
The tester will then send two HTTP requests to your ...
0
votes
1
answer
44
views
Reverse name lookup with getnameinfo() doesn't work with custom sockaddr_in6
I wrote the following code and expect it to return the address of google.com. However, it returns me an empty string at the end. What do I need to fix to make it work? getnameinfo() gives me the error ...
1
vote
0
answers
45
views
`recv` socket error EMSGSIZE when downloading file via HTTP/TCP/IPv6/LTE-M
I'm trying to download a largish file (~167KB) via HTTP/TCP/IPv6 over LTE on an nrf9160.The sockets' execution is offloaded to the modem.
The modem crashes every time around the same point during the ...
0
votes
2
answers
57
views
C socket programming sending an image file "the image cannot be displayed because it contains an error"
I've been working on a project where I'm implementing an HTTP server in C, and I'm encountering an issue with rendering images in a web browser. Every time I try to access the image via the server, I ...
0
votes
0
answers
81
views
TCP socket programming, uploading and downloading jpg files in C
I have a problem that if I play this program, the connection between client and server has been successful. But after that, when we try the client to upload or download jpg file from server, there is ...
0
votes
0
answers
39
views
gcov does not cover an executed line
There is an executed section in the code that gcov ignores.
intro:
I am working on a task that we got in class to implement netcat-like program called 'mync' in C using sockets and system calls to in ...