Is there any information in the struct skbuff to distinguish between the forwarding traffic (bridge forwarding and ip forwarding) and locally originated traffic? We want to treat these two kinds of traffic differently in the network driver because the forwarding traffic do not require cache invalidation on the whole packet size. Any suggestions are appreciated. Thank you very much! Answer
Tag: networking
How to programmatically check for connection?
In Linux (Ubuntu), I want to programmatically check if there is Internet connection (or if eth0 is connected). I’m doing this because I am writing a program that requires network connection on a system that is highly prone to lose connection. So I was thinking maybe a script that I can run periodically to check. Can you give me good
Trouble on state FIN_WAIT_1
recently i’ve got some port holding on FIN_WAIT_1 state till two days later. The target port is used by one server process ever and client connect to the server process through this port. The situation is we stopped the server process, and obviously some client is still connecting with the server at that moment. From my understanding, the server process
capture network traffic on two different ports simultaneously
I wish to capture tcpdump traffic on two different ports simultaneouly . I tried this .. Althoug it worked but problem is first it will wait for traffic on port 21 and when interrupted then it will wait for port 22. Also another problem is it will not capture the traffic on port 22 untill traffic on port 21 will
Getting IP address from struct sockaddr doesn’t work for 32bit compilation
I have a small client/server app that sends/receives UDP discovery packets. When a UDP packet is received I want to display the source IP. The client/server code is based on the UDP example from Beej: https://beej.us/guide/bgnet/html/multi/clientserver.html When I compile for 64bit the IP is displayed as expected but when I compile for 32bit (-m32 option) it doesn’t get the right
using C code to get same info as ifconfig
Is there a way in Linux, using C code, to get the same information that “ifconfig eth0” would return? I’m interested in things like IP address, link status, and MAC address. Here’s sample output from ifconfig: Answer Yes, ifconfig itself is written in C. 🙂 See: http://cvsweb.netbsd.org/bsdweb.cgi/src/sbin/ifconfig/ifconfig.c?rev=1.169&content-type=text/x-cvsweb-markup Do man netdevice to see the details (on Linux). You use the ioctl()
tipc protocol in windows [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations. Closed 11 months ago. Improve this question Any idea for TIPC protocol on Windows systems or any similar
Get notified about network interface change on Linux
I need a way to notify my user space app when a network interface is enabled or disabled. I’m hoping to do this without resorting to polling. Does the kernel offer some sort of hook for triggering callback functions when network-related events occur? Answer I believe the netlink (man 7 netlink) facility provides information about network interfaces via the NETLINK_ROUTE
Find the IP address of the client in an SSH session
I have a script that is to be run by a person that logs in to the server with SSH. Is there a way to find out automatically what IP address the user is connecting from? Of course, I could ask the user (it is a tool for programmers, so no problem with that), but it would be cooler if
How can I get the current network interface throughput statistics on Linux/UNIX? [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question