Questions tagged [ip-protocol]
20 questions
28
votes
3 answers
Why does UDP have a length field in the header and TCP does not?
Why does UDP have a length field in the header and TCP does not?
I am guessing that the length of the segment in TCP is inferred from the IP header but one should be able to do the same for a UDP datagram
IP Help
17
votes
3 answers
How to calculate the internet checksum from a byte[] in Java
I'm trying to figure out how to calculate the Internet Checksum in Java and its causing me no end of pain. (I'm horrible at bit manipulation.) I found a version in C# Calculate an Internet (aka IP, aka RFC791) checksum in C#. However my attempt at…

chotchki
- 4,258
- 5
- 34
- 55
13
votes
6 answers
sending multiple tcp packets in an ip packet
is it possible to send multiple tcp or udp packets on a single ip packet? are there any specifications in the protocol that do not allow this.
if it is allowed by the protocol but is generally not done by tcp/udp implementations could you point me…

Rohit Banga
- 18,458
- 31
- 113
- 191
9
votes
2 answers
How to spoof an IP Address using a socket?
I'm working on a website testing framework, and I'd like to be able to spoof the user ip. I've read, that software like Loadrunner can do this, and I'd like to be able to do this as well.
A tutorial on how to use a socket normally can be found here,…

Arsen Zahray
- 24,367
- 48
- 131
- 224
4
votes
1 answer
How frequently IP packets are fragmented at the source host?
I know that if IP payload > MTU then routers usually fragment the IP packet. Finally all the fragmented packets are assembled at the destination using the fields IP-ID, IP fragment offsets and fragmentation flags. Max length of IP payload is 64K.…

Methos
- 13,608
- 11
- 46
- 49
4
votes
1 answer
How to implement RFC 3393 (Ipdv packet delay varation) in C?
I am building an Ethernet Application in which i will be sending packets from one side and receiving it on the other side. I want to calculate delay in packets at the receiver side as in RFC 3393. So I have to put a timestamps in the packet at the…
sagar
3
votes
4 answers
What does LAN/traffic congestion mean?
While talking about UDP I saw/heard congestion come up a few times. What does that mean?
user34537
3
votes
1 answer
Question regarding ip checksum code
unsigned short /* this function generates header checksums */
csum (unsigned short *buf, int nwords)
{
unsigned long sum;
for (sum = 0; nwords > 0; nwords--) // add words(16bits) together
{
sum += *buf++;
}
sum = (sum >> 16) + (sum…

looktt
- 91
- 1
- 4
2
votes
1 answer
How to set socket option IP_DONTFRAG in python?
How can I set DONT_FRAGMENT flag in IP header using python sockets?
The following code
socket.setsockopt(socket.IPPROTO_IP, socket.IP_DONTFRAG, 1)
gives me this error:
AttributeError: 'module' object has no attribute 'IP_DONTFRAG'
Anyone has an…

Julia Patacz
- 21
- 2
2
votes
2 answers
What is the necessity of IP-in-IP?
There is even a standard for IP in IP encapsulation. What is the use case here? I can understand stuff like TCP over DNS, where IP might be unavailable, but if you can do IP in IP, couldn't you simply do regular IP?

Claudiu
- 224,032
- 165
- 485
- 680
2
votes
3 answers
Calculate an Internet (aka IP, aka RFC791) checksum in C#
Interestingly, I can find implementations for the Internet Checksum in almost every language except C#. Does anyone have an implementation to share?
Remember, the internet protocol specifies that:
"The checksum field is the 16 bit one's complement…

Pat
- 16,515
- 15
- 95
- 114
2
votes
1 answer
How do I compute an RFC 791 IP header checksum?
I am rolling my own IP packets for a teach-yourself-Ruby project, and need to compute the IP header checksum (as described in RFC 791 p.14). One of the related questions that popped up when I typed my question here pointed me at RFC 1071, so I'm…

Josh Glover
- 25,142
- 27
- 92
- 129
2
votes
5 answers
Why Fragmentation is Done at IP why not for TCP/UDP
I am looking for the reason Why Fragmentation is Done at IP level but why not for TCP/UDP.
Suppose say my frame looks like this |MAC|IP|TCP|Payload|FCS. the whole size if say for eg: 1600. PathMTU happens here, why fragmentation is implemented @ IP…

Priyanka Mishra
- 10,400
- 18
- 62
- 75
1
vote
3 answers
Tutorials for problems with Xilinx's microblaze IP Stack
My team is using the microblaze and we're having some trouble with the ip stack.
I am usually not an embedded programmer but I would like to learn how to help.
Are there any tutorials about IP stacks? What are they? How are they programmed? How can…

the_drow
- 18,571
- 25
- 126
- 193
0
votes
1 answer
Azure traffic direction explanation
I am really not clear what outbound(egress) and inbound(ingress) traffic means. I have two theories
inbound just specifies that the origin is outside and target inside i.e. HTTP round trip to some VM hosted web is ingress, the response with HTTP…

Zveratko
- 2,663
- 6
- 35
- 64