Currently, debugging the tethering programs is not easy because
in case of any failure they simply return TC_ACT_OK. This CL adds
a number of counters that the program can increment in the case
of interesting events such as malformed packets.
At the moment the counters are stored in a global tethering error
map, which is an ARRAY map of 32-bit counters. This should not
take up much space because there are only a dozen of these.
We might not need all of these counters. In future CLs we can
reduce the number of counters, or perhaps move them to a map of
maps so as to have separate counters on a per-interface basis.
Test: manual
Change-Id: I3fcd7eb8d318700092949ff2f39987bf4ba3656c
This provides a place to store common definitions that can be
used by both the programs and by JNI code in the tethering
module.
Over time much of the tethering-specific code in bpf_shared.h
could move here.
Test: m
Bug: 177884581
Change-Id: I4bf2c762d61cd5db003d59880e6bf7d107ff1a07