Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 0b60d605 authored by Maciej Żenczykowski's avatar Maciej Żenczykowski
Browse files

netd bpf - create and use is_received_skb() helper



See kernel: include/uapi/linux/if_packet.h

  /* Packet types */
  #define PACKET_HOST        0   /* To us		*/
  #define PACKET_BROADCAST   1   /* To all		*/
  #define PACKET_MULTICAST   2   /* To group		*/
  #define PACKET_OTHERHOST   3   /* To someone else 	*/
  #define PACKET_OUTGOING    4   /* Outgoing of any type */
  #define PACKET_LOOPBACK    5   /* MC/BRD frame looped back */
  #define PACKET_USER        6   /* To user space	*/
  #define PACKET_KERNEL      7   /* To kernel space	*/
  /* Unused, PACKET_FASTROUTE and PACKET_LOOPBACK are invisible to user space */
  #define PACKET_FASTROUTE   6   /* Fastrouted frame	*/

So basically PACKET_{HOST,BROADCAST,MULTICAST} are inbound to us.

Test: build, atest
Bug: 141532657
Signed-off-by: default avatarMaciej Żenczykowski <maze@google.com>
Change-Id: I00230887e3c90c077d53a40b26d9a8a1ca14340f
parent 3590062b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment