HEADER_SIZE in source

This forum is for general conversation and user-user networking.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
kuchiku
OpenVpn Newbie
Posts: 6
Joined: Sat Apr 23, 2011 10:32 pm
Contact:

HEADER_SIZE in source

Post by kuchiku » Sat Apr 23, 2011 10:44 pm

Can someone explain to me where did this values came from?

Code: Select all

/*
 * Overhead added to packets by various protocols.
 */
#define IPv4_UDP_HEADER_SIZE              28
#define IPv4_TCP_HEADER_SIZE              40
#define IPv6_UDP_HEADER_SIZE              40

I cant find any reference to 28 and 40 in the packet structure of tcp and udp.

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: HEADER_SIZE in source

Post by janjust » Sun Apr 24, 2011 9:27 pm

28 and 40 bytes for UDP and TCP traffic are "normal" in my view.
read up on the ethernet and tcp/udp protocols, e.g.
http://sd.wareonearth.com/~phil/net/overhead/

kuchiku
OpenVpn Newbie
Posts: 6
Joined: Sat Apr 23, 2011 10:32 pm
Contact:

Re: HEADER_SIZE in source

Post by kuchiku » Sun Apr 24, 2011 10:39 pm

Thanks for the link

Post Reply