network-protocols

How to fake source ip-address of a udp-packet?

喜夏-厌秋 提交于 2019-11-28 23:05:23
Think about the following: Your ISP offers you a dynamic ip-address (for example 123.123.123.123). My question is simple (the answer may not be): Is it possible to send a single udp-packet with an outer source-ip (for example 124.124.124.124) to a fixed-ip server? I don't need to get an answer from the server. I just want to know if/how this one way communication can be done, using a faked source-ip address. The server and no one else should not be able to find out the real client ip. Jacob Schoen The UDP packet does not actually have the source (your) IP address. The source IP address is part

What happens to TCP and UDP (with multicast) connection when an iOS Application did enter background

别来无恙 提交于 2019-11-28 21:41:44
问题 I created couple experiments: Setup 1: I created a TCP Sender app and a TCP Receiver app. For this experiment, I started the TCP Sender on an iOS device and the TCP Receiver on another iOS device. And then both are verified to have made connection and sending and received data. I then put the TCP Receiver app into background. The TCP Sender app indicated lost of connection and crashed (yes, I intended that way). Setup 2: I created a UDP Sender app and a UDP Receiver app. Same as above, I

Winsock UDP packets being dropped?

孤人 提交于 2019-11-28 21:38:09
We have a client/server communication system over UDP setup in windows. The problem we are facing is that when the throughput grows, packets are getting dropped. We suspect that this is due to the UDP receive buffer which is continuously being polled causing the buffer to be blocked and dropping any incoming packets. Is it possible that reading this buffer will cause incoming packets to be dropped? If so, what are the options to correct this? The system is written in C. Please let me know if this is too vague and I can try to provide more info. Thanks! The default socket buffer size in Windows

Understanding struct sockaddr

狂风中的少年 提交于 2019-11-28 21:22:32
struct sockaddr { unsigned short sa_family; // address family, AF_xxx char sa_data[14]; // 14 bytes of protocol address }; In this structure what exactly is the meaning address family depicted by sa_family ? Does it mean that protocols like TCP/UDP have "addresses"? Well, the protocols can be identification numbers not addresses, I think. Anyway, if yes, then on what basis have their families been divided? Len Holgate The format and size of the address is usually protocol specific. sockaddr is used as the base of a set of address structures that act like a discriminated union, see https://beej

Connecting P2P over NAT?

末鹿安然 提交于 2019-11-28 17:13:28
I started to explore the option of connecting with other using a p2p connection, so I coded a simple socket program in JAVA for android devices in which the users can share simple messages p2p (I didn't have any idea about NAT then). I got to know about NAT, so I now need to establish a TCP connection with another user which uses a server for discovery but payload is transferred p2p. I have also looked at XMPP(a very good and detailed explanation of how protocol works is here ) and UPnP but I dont know how to implement them. Another interesting question that arises is of BitTorrent because

TCP Hole Punching

若如初见. 提交于 2019-11-28 16:54:22
I'm trying to implement TCP hole punching with windows socket using mingw toolchain. I think the process is right but the hole doesn't seems to take. I used this as reference. A and B connect to the server S S sends to A , B 's router IP + the port it used to connect to S S does the same for B A start 2 threads: One thread tries connecting to B 's router with the info sent by S The other thread is waiting for an incoming connection on the same port used to connect to its router when it connected to S B does the same I have no issue in the code I think since: A and B does get each other ip and

stateless protocol and stateful protocol

不打扰是莪最后的温柔 提交于 2019-11-28 16:43:50
问题 How to understand stateless protocol and stateful protocol? HTTP is a stateless protocol and FTP is a stateful protocol. For the web applications requiring a lot of interactions, the underlying protocol should be stateful ones. Is my understanding right? 回答1: Since you're asking about a Web application, the protocol will always be stateless -- the protocol for the Web is http (or https), and that's all she wrote. I think what you're thinking of is providing a state mechanism in your Web

Is it possible to include multiple CRLFs in a HTTP header-field?

好久不见. 提交于 2019-11-28 07:13:20
问题 Below is HTTP-message definition in latest HTTP RFC 7230 HTTP-message = start-line *( header-field CRLF ) CRLF [ message-body ] Below is definition of header-field, header-field = field-name ":" OWS field-value OWS field-name = token field-value = *( field-content / obs-fold ) field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] field-vchar = VCHAR / obs-text obs-fold = CRLF 1*( SP / HTAB ) ..and: obs-text = %x80-FF ..and ABNF's: VCHAR = %x21-7E ; visible (printing) characters As we

How to measure network performance (how to benchmark network protocol)

馋奶兔 提交于 2019-11-28 07:00:49
First, a bit of a background. There are many various comparisons of distributed version control systems (DVCS) which compare size of repository, or benchmark speed of operations. I haven't found any that would benchmark network performance of various DVCS, and various protocols used... beside measuring speed of operations (commands) involving network like 'clone', 'pull'/'fetch' or 'push'. I'd like to know then how would you make such comparison; how to measure network performance of an application, or how to benchmark network protocol. I envision here among others also measuring dependence of

Printing using IPP without drivers (IPP Client)

Deadly 提交于 2019-11-28 05:08:37
I have a device/appliance that you cannot install drivers for. I would like to add the ability to support network/IPP/AirPrint printers by having the user add the IP Addresses. Since I am not printing through windows (which would use the IPP), how do I use IPP myself? Is there a c# client (or any windows library) out there that allows you to interact with IPP printers with the IPP protocol? There are a few IPP-Client implementations and IPP Libraries available for different programming languages (java/php/python). A practical solution could be to use the ipptool available at http://cups.org