On Friday 26 February 2016 14:18:17 Andreas Pape wrote:
if (vhdr->h_vlan_encapsulated_proto == ETH_P_IP) {
Either you htons the ETH_P_IP or you have to ntohs the vhdr->h_vlan_encapsulated_proto. But one of them has to converted to the byte order of the other one.
Kind regards, Sven