Questions tagged [network-programming]
Programming associated with creating and managing networks as well as adding network connectivity to a (set of) programs.
10,969
questions
-1
votes
0
answers
17
views
Assign default gateway to a brigde
On my embedded linux device i have multiple physical ethernet device like eth1, eth2, etc.
One requirement for me is that multiple devices share the same ip address. This has been solved via a bridge.
...
0
votes
0
answers
35
views
getaddrinfo linux manpage server example but using TCP instead of UDP
I'm trying to convert the server program example from getaddrinfo's linux manpage from UDP to TCP.
When running the program without any change first, I can communicate with a netcat client using UDP :
...
1
vote
1
answer
57
views
Writing directly to socket vs to buffer
I have seen multiple applications write their data first to buffer, then writing that buffer to socket and not just directly to socket.
I have two questions:
Why is that?
If writing straight to ...
0
votes
0
answers
9
views
Is there a conventional way to add services to the database as used by getservbyname()?
I have many services in my project, and I'd like each project to add it's name to the services database so that functions such as getservbyname() recognize my services.
Here is an example:
I create a ...
-3
votes
1
answer
87
views
Why does this function loop forever?
I have this function that takes a SOCKET and a file name to the output file, then it tries to receive and output the data to a file, when compiling and running the code it works fine but the program ...
0
votes
0
answers
17
views
Is it possible to implement a routing protocol in Mininet and do evaluations?
I want to implement a specific IGP routing protocol in Python and do performance evaluations (for scientific research purpose). I don't know whether Mininet is the best option or not by taking into ...
0
votes
0
answers
21
views
Funny network packets with unknown hardware address
I have written a little program to investigate my home network, to see what packets are underway. I print the hardware address, and the number of packets.
Looks quite normal, i know all these ...
0
votes
1
answer
19
views
Distributed computing in a network - Framework/SDK
I need to build a system that consist of:
Nodes, each mode can accept one input.
The node that received the input shares it with all nodes in the network.
Each node do a computation on the input (...
2
votes
0
answers
8
views
creating network id by attributes
I have a large dataframe of network IDs, displaying migration networks. I would like to find out the most frequent network structures.
Meaning:
Network A: Migrant A sponsors his spouse. The spouse ...
0
votes
0
answers
27
views
Strange behavior of socket-bind in kubernetes container
I have this simple socket client:
#include <arpa/inet.h>
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <unistd.h>
int main(int argc, char ...
0
votes
0
answers
14
views
How do I convert the IP to domain name (not hostname) in java?
How do I convert the IP to domain name (not hostname) in java?
C:\WINDOWS\system32>ping google.com
Pinging google.com [142.251.42.78] with 32 bytes of data:
public static void main(String[] args) {
...
0
votes
0
answers
24
views
How to Rate Limit existing XML based API without much code change at client side
I need to rate limit a live XML based API implemented in Android SDK.
The SDK is already live and multiple clients are using it.
Hence I need to design a solution which will require minimal OR no code ...
-1
votes
0
answers
19
views
wpa_supplicant reading wrong file
im having a problem when switching between hotspot(hostapd) and wpa(wpa_supplicant). wpa is reading the wrong file when trying to switch. my configs are like this:
https://pastebin.com/MHLbQBmQ
when i ...
0
votes
0
answers
17
views
How do i run two slices of four switch each in flowvisor?
I am new in flowvisor. I have somehow installed flowvisor.
But i dont have any idea how to run.
I have gone through some examples on Github, but I am confused.
I want to run two slices of four ...
1
vote
0
answers
26
views
connect failed to service inside container
I have nginx and a REST service (go lang) behind it, both running in a container.
After several days of running the container, connections to my service fail.
Nginx error.log shows
2022/06/17 08:51:...
-1
votes
0
answers
18
views
Both Open vSwitch and Ryu controller do not show the correct port statistics
I am using an OpenFlow controller (Ryu) to collect port statistics of Open Vswitch.
The topology is created with the following command :
sudo mn --topo tree,3 --mac --arp --switch ovsk --link
tc,bw=...
0
votes
0
answers
32
views
KotlinExtensions.kt line XX retrofit2.KotlinExtensions$await$2$2.onResponse got this countless time with Crashlytics
I'm developing an app recording with a background service your position and sending it to a server, every second. As many other users, we have to deal with battery saver to make sure the background ...
0
votes
0
answers
21
views
Receive a TCP SYN packet without sending a SYNACK response
I want to be able to receive SYN packets from a client, but not send back a SYNACK response. I have tried a few things. If you use raw sockets, it is possible to receive the full packet but linux ...
0
votes
0
answers
15
views
How to give a linux container on ChromeOS an outside accesible ip
I am trying to host the most basic python flask server over the linux container on ChromeOS.
The flask server hosts no problem, i have more of a problem with accessing it.
The thing is that the linux ...
-1
votes
0
answers
12
views
Best Practice: Continuously send feedback to front (Azure Available) [duplicate]
Consider the following system:
A python Flask App(name: FRONT) is exposed to open internet with two features:
Place a job
track job status
Place job sends the request forward and starts a container ...
-2
votes
0
answers
20
views
Virtualbox cannot communicate with the host machine [closed]
I have in my PC a Parrot VirtualBox machine that I have connected using as adapter 1 a Bridged adapter and as adapter 2 a Host-only adapter that has an IPv4 of 192.168.1.200 and a network mask of 255....
0
votes
0
answers
20
views
Pair all nodes in a network at random
My problem consists in finding an algorithm to select a random coupling of all nodes in a network, such that each node is coupled with an adjacent node, no node stays uncoupled, and all the possible ...
0
votes
1
answer
17
views
how can I set Network interface status?
In Python, is there a way to set network interface up or down ? i'm working with linux
In my script I would like to set the interface up and down ?
-2
votes
0
answers
15
views
In which format these data are encoded? Is there any way to decode these data?
hey I got these data from a network traffic, I want to get format of this data and also want to decode this.
Please give any solution.
data
data
data
0
votes
0
answers
24
views
How can i make server writen in c connect to router get ip so that i can acess my server from any device that is connected to same wifi
I am new to networking in c.I have manage to make a server using sockets and i managed to send a html code to the browser and let the browser render it.
hear is the code
#include <stdio.h>
#...
-2
votes
1
answer
34
views
MacOS iptables equivalent [closed]
I recently switched from Linux to Mac.
My symfony application runs in a docker-compose setup
and has a socks5 proxy, I want to tunnel an ssh connection to.
SYMFONY_APP_PROXY=socks5h://172.17.0.1:8086
...
-2
votes
0
answers
38
views
Architecture: Best Setup with node web server to have posted data saved on a particular client computer
This is a general question for a setup I wish to establish. Different architectures are welcome.
So What I want:
Have a node, express, web server running
Have client post data to that web server
...
0
votes
0
answers
45
views
Inter-process communication in Battleship-Game
I'm currently struggling at a school-project. We needed to develop a python game. Which we did.
It's a Player vs. Player Battleship Game on python which consists of two .py files, "play" and ...
0
votes
0
answers
14
views
How port 443 data transfer happens
As per convention, port 443 is used for HTTPS. Then, how all the secure data transfer happens in just one port. For example, Let's think, I am using Chrome with multiple tabs in port-45821, Mozilla ...
-1
votes
0
answers
33
views
One socket per interface for Multicast IP
I'm trying to open several sockets to listen on the same IPv4 multicast IP+port, but incoming datagrams seem to always be delivered to the first one rather than to the one for the appropriate ...
2
votes
0
answers
41
views
Azure Front Door - SocketExceptions
What in Azure Front Door could be the cause of random socket exceptions?
Background: I own an API that handles roughly 400,000+ calls a day, primarily from internal clients that I also own. Over a ...
0
votes
0
answers
17
views
How to get list of IP address which are subset are super set of a given IP address from CosmosDB Container or any SQL DB table
I a have table which contains column which has array of IP address , I have to retrieve the list of IP address which are subset or superset of the given IP address.
Looking for solution in C#
Table
If ...
0
votes
2
answers
76
views
HttpClient socket exception
I am trying to call some external API hosted on azure from my web Api. The API is working fine on my local machine but when I deploy it IIS on server it starts throwing System.Net.Sockets....
1
vote
1
answer
23
views
Scapy, IndexError: Layer [Dot11] not found
I am trying to send a HTTP response using scapy. I sniff out an request and then attempt to fabricate a response. I am basing this off the code in this question. Here is the code that is causing ...
-1
votes
0
answers
13
views
Bursts of network traffic sent to incorrect ports
My issue is that I have a switch where random occurrences of (for the lack of a better term) data storms are happening.
Details of “storm”:
I have set up port mirroring on a specific security device ...
-3
votes
0
answers
31
views
Process level network management, using Linux Shell
I have a running process of Firefox browser. Having its process ID I want to disconnect it(or restrict it's in-bound stream) from network temporarily and reconnect it soon later by Linux Shell.
0
votes
0
answers
23
views
with TCP NAGLE off, how much delay between send calls will prevent messages from being combined in one packet
I am sending via TCP multiple fixed length messages to a server that requires that messages not be split between two packets. I know that that is not the way that TCP works, but I have no control over ...
-1
votes
1
answer
29
views
HTTP redirect does not work in every browser
I am running an HTTP-Server with a ServerSocket and listening for Socket's that the server accepts. I want to redirect to an external site depending the request. So far I parse the request and write ...
0
votes
0
answers
23
views
recv() and recvfrom() functions not receiving data from pcap using Python
All the ports and IP addresses in pcap file are correctly set. I have tried using recv(), recfrom() and recvmsg(). Is there any other function for receiving data in Python from a pcap file?
Server ...
1
vote
0
answers
17
views
NWConnection: Unable to modify the remote endpoint
In order to operate the “Session Traversal Utilities for NAT” (STUN) protocol in SWIFT I first open a NWConnection with a remote STUN server of known remoteIP and remotePort like this:
udpConnection = ...
0
votes
0
answers
18
views
How to transfer variables between consoles or devices?
I have this python-script that I am trying to write where it is necessary to transfer a large amount of data between different consoles (running different instances of the same program). The idea is ...
0
votes
0
answers
17
views
Python: Accessing network devices and sending configuration with verify it
I trying to make Python script that accessing devices devices and since the devices are accessible then I can star making new credential with matching the IP with verify it I would like to have help ...
0
votes
1
answer
30
views
API Call works for IPv4 Address (127.0.0.1) but get a "Error: connect ECONNREFUSED ::1:3001" when using localhost
So I have a very simple API call using fetch on my frontend to http://localhost:3001/test that gives me an error: Error: connect ECONNREFUSED ::1:3001
However, when I call that API directly (enter the ...
0
votes
0
answers
16
views
Python GUI (tkinter) does not print out line by line but still works. Python Networking
i am currently developing a Python GUI with tkinter that rely on a open source network monitor with the functionalities to write the outputs on few of the functionalities such as:
Requiring ...
0
votes
0
answers
18
views
Connecting two instances of a program with each working as a server and client at the same time using threads
first time asking here, hope you are all having a great day.
I'm sort of new to network programming in C, but I need to get this done. The idea is to create a chat that has a client and a server each ...
0
votes
0
answers
32
views
How to read status bytes from a socket properly in a real-time system?
I am designing a real-time c++ system which receives a status byte on a socket at 100hz. I am wondering what is the best way to read these bytes from the socket and process them one by one. I read in ...
0
votes
1
answer
90
views
How should I approach parsing the network packet using C++ template?
Let's say I have an application that keeps receiving the byte stream from the socket. I have the documentation that describes what the packet looks like. For example, the total header size, and total ...
-1
votes
1
answer
40
views
Internal wlan network scanning in android
I am developing an android application. In that app i need to implement an functionality like scan an internal wifi network and list out all the ip address and mac address of devices (both mobile and ...
0
votes
1
answer
25
views
Hosts can't ping each other on mininet VM with custom topology and OpenDayLight
Preface
Host OS: Win10
Mininet VMs tried: Ubuntu Server 18.04, 18.04.6, 20.04, 22.04, preconfigured VM supplied by mininet
I've also tried using a pre-configured ODL VM and building from the sources ...
3
votes
1
answer
41
views
Get Network connection warning in Android
I am trying to programmatically detect, when an Android phone is triggering this "warning", that the established internet connection currently seems to be unreachable (In this case: Edge / ...