network-protocols

Design an ipstack in C++

I want to implement an IP stack in C++ as a training project for me to the Linux and networking world. I have some knowledge of how the Linux IP stack works, but, as I said I want to implement something in C++ which has a good design rather then focusing on performance. Does anyone know where I can find written design for IP stacks writ...

How to implement icmp packet handler using winsock version 1.1?

I am working on an very old application right now. I need to make change in this application to listen for coming icmp request and decide to reply or drop the packet (kind of access control on ICMP). The application is Winsock version 1.1 based. I tried different ways to create a socket and capture icmp packet using the socket. But none ...

Tcp connections hang on CLOSE_WAIT status.

Client close the socket first, when there is not much data from server, tcp connection shutdown is okay like: FIN --> <-- ACK <-- FIN, ACK ACK --> When the server is busying sending data: FIN --> <-- ACK,PSH RST --> And the server connection comes to CLOSE_WAIT state and hang on there for a long time. What's the problem ...

Is there an open source (read free) tool that allows me to see my browser's HTTP commands?

I am getting into HTTP protocol specifics and I would like to see/understand the calls my browser makes as it is being used. I use Firebug (with Firefox) to look at/debug AJAX interactions, etc, but don't see the full HTTP conversation. Is there something similar for viewing HTTP commands issued by a browser? ...

How Network Layer finds route for a packet.

An HTTP application request for www.stackoverflow.com. This message is passed to Transport layer. Transport layer adds its header and sends the packet to Internet Layer. The Internet Layer cannot see www.stackoverflow.com as it can only access the header which was appended by Transport Layer. Then how can Internet Layer decide route for ...

Why wait SIFS time before sending ACK?

Question about the MAC-protocol of 802.11 Wifi. We have learned that when a station has received the data it waits for SIFS time. Then it sends the packet. When searching online the reason that is always mentioned is to give ACK packets a higher priority. This is understandable since a station first has to wait DIFS time when it wants t...

How host name is broadcasted in a subnet

Hello. I'm working with Microchip's TCP/IP stack and the host name of my device is not being broadcasted, although I can access it using its DHCP assigned IP. So the question is, what is the protocol that a network device uses to broadcast its host name, so that when I see a list of devices in a network I can identify it by name? ...

Designing a network protocol for realtime data / mobile devices

I'm faced with a following dilemma: Design a new network protocol which would be used between a server (Java software) and desktop and mobile clients. The mobile clients include J2ME, Android and maybe in the future even iPhone. The data stream is a realtime, constant stream with also more infrequent parts. The clients show waveforms o...

What is the framework/function used in Cocoa for detecting machines

I'm trying to get a listing of machines in my local domain, specifically ones running a administrative web service (_asip-webadmin). I've been fooling with NSNetService but it would seem that it's only good for Bonjour listings (as I can trap them just fine). I've tried something along the lines of: [mySearch searchForServicesOfType:@"_...

sending file by C++

I want to send a file in C++ over network (for a chat program) what should I do? ...

Is it possible to receive a web client request from a reserved IP block ?

My webapp received a request from 10.18.255.249 (but the 10.0.0.0/9 cidr block is reserved) according to https://www.arin.net/knowledge/rfc/rfc1918.txt How is this even possible? ...

Is it possible to include l7-filter protocols in a commercial project?

My task is to make a networking application with protocol identification, under a proprietary license. I am considering reusing the protocol matching patterns from l7-filter, but not l7-filter itself. These data files are available under a dual GPLv2/CC-ShareAlike 2.5 license. The CC license says I can't "build upon" it, but is it OK to...

What kind of SCTP support is there on various Windows versions?

What kind of SCTP support is there on various Windows versions? ...

TCP Sequence numbers related problem

While opening a TCP connection , the initial sequence number is to be derived using ToD clock that keeps running even when the host is down. The low order 32 bits of the counter of the ToD clock is to be used for the initial seq no. The clock counters increments once per milli second. The maximium packet lifetime is given to be 64s. Wh...

What is the most lightweight way to transmit data over the internet using Python?

I have two computers in geographically dispersed locations, both connected to the internet. On each computer I am running a Python program, and I would like to send and receive data from one to the other. I'd like to use the most simple approach possible, while remaining somewhat secure. I have considered the following solutions, but I'...

Why is writing a closed TCP socket worse than reading one?

When you read a closed TCP socket you get a regular error, i.e. it either returns 0 indicating EOF or -1 and an error code in errno which can be printed with perror. However, when you write a closed TCP socket the OS sends SIGPIPE to your app which will terminate the app if not caught. Why is writing the closed TCP socket worse than re...

SCTP with Multihoming as a Drop In Replacement for TCP

SCTP has native multi-homing support which if I understand it correctly will automatically reroute your packets over a secondary NIC if the primary interface goes down. I duplicated this functionality with TCP by writing a custom routing deamon to modify the routing tables if my primary NIC goes down. I would like to try using SCTP ins...

Select returning 0 on a closed SCTP socket

This is related to the question: SCTP with Multihoming as a Drop In Replacement for TCP I have a simple echo client / concurrent server app that ran perfectly fine using TCP. I could pipe a file to stdin on the client and the client would receive all the data back, call select which would return 1 indicating the socket was readable, t...

Write program like netstat

I would like to write an application like a netstat - to show all the active connections and the open ports respectively. The problem is that I don't know how to do it - I've done some network programming but in general it was some simple server-client packet and simple TCP and UDP packets sending/receiving. I looked at the netstat cod...

Help with windows TCP Port communication

I'm new to understanding how interprocess communication works. I"m working with two applications on my localmachine, a Source Application and a Server Application. The Source application broadcasts files through a configured port on my pc. The Server application listens for those files and exposes them to the internet for users to stream...