Skip to content
Advertisement

Tag: networking

Raw Sockets in C

1. The linux manual page says about this code. In socket option, if IP_HDRINCL is set, I can make IP header. Am I right? If it’s right, above socket also let me make TCP header, too? Then, if IP_HDRINCL is not set, what means above socket? 2. what means above code comparing to number 1 question’s code? I know IPPROTO_RAW

Is libpcap implemented by socket API?

libpcap is used for package capturing. As I understand, it can capture the network packages from all ports. And it can capture the package data in link layer (such as ethernet frame). This looks a little confusing to me, because it seems impossible to intercept all network traffic (from all ports) by just using the socket API in Unix-like system.

Get Subnet mask in Linux using bash

I am using bash to get the IP address of my machine with that script: And now I am trying to get the Subnet Mask in this type: But I have no idea how can I do that. Answer there are couple of ways to achieve this: first: to print the mask in format 255.255.255.0, you can use this: second:

Linux: Port Isolation on a Bridge to use OLSR correctly

On a router running OLSR there are four ports/interfaces where connected devices talk OLSR to each other. Now i dont like to use an IP address for each interface but instead bridge them all and set just one IP address on the bridge. The problem now is, those devices should NOT see each other on layer2, else olsr routing changes

Simulate VPN connection in docker

I want to simulate a VPN traffic on my machine. I’ve set up VPN server which runs inside a docker image. I can successfully log in. The problem is that the docker image is running on my machine on the default docker’s bridge – docker0. There is no change if I do connect to machine using VPN or not. It

Advertisement