0

In my ND daemon, i am using rbos_socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6); to receive ICMPv6 header for receiving NS and other ND messages (l3 messages). With this option kernel will strip the l2 header (with VLAN information). which option should I use to avoid this stripping?

My intent is to receive ICMPv6 message with VLAN information.

Already tried using the following: 1) rbos_socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6); 2) rbos_socket(AF_INET6, SOCK_RAW, PROTO_ND)

My expectation is to receive ICMPv6 message with l2 information (specifically VLAN header).

Achal
  • 11,821
  • 2
  • 15
  • 37

1 Answers1

0

You cannot get the first VLAN tag like this. It does get stripped from the packet, but it is available out-of-band in the tp_vlan_tci and tp_vlan_tpid members, see linux/if_packet.h (assuming this is on Linux).

Cheatah
  • 1,825
  • 2
  • 13
  • 21