--- gvpe/src/device.h 2011/02/08 23:13:48 1.23 +++ gvpe/src/device.h 2011/09/16 18:01:26 1.25 @@ -58,6 +58,11 @@ memmove ((void *)&(*this)[0], (void *)&(*this)[hdrsize], len); } + u16 ipv4_hdr_len () const + { + return ((*this)[0] & 15) << 2; + } + void set (const net_packet &pkt) { len = pkt.len;