Skip to contentSkip to conversation

Prefixed bytes

Openvpn-devel Bram 2 participants 2 messages Feb 28, 2005

lore
Share & tools
lore

Bram

author
#0 lore raw

Hello,

According to this message:
http://sourceforge.net/mailarchive/message.php?msg_id=10639223 OpenVPN adds a cleartext uint16_t length word before every packet, now my question is this: is it always the same word? where is it defined/calculated etc?

I tried figuring it out by looking at logs of tcpdump but I was unluky, also taking a look at the source code turned up some results but not quite what I was looking for...

I want/need to know this to be able to use l7-filter (an extension to iptables to be able to filter on the data of a package)...

Thanks,

Bram

#1 lore raw
Quoted 7 lines · Bram

Hello,

According to this message:
http://sourceforge.net/mailarchive/message.php?msg_id=10639223 OpenVPN adds a cleartext uint16_t length word before every packet, now my question is this: is it always the same word? where is it defined/calculated etc?

A uint16_t word is used to packetize TCP streams. It's not used with UDP because UDP is already packetized (so the equivalent length would be in the header).

It's not always the same word -- it is a packet length, and will vary with every packet.

It's calculated by the stream_buf_x functions in socket.[ch]

James