blob: 7cec065a440b4a76065599e4ce0f373b9fb8509c [file] [log] [blame]
Hungming Chen41b2ae12020-02-04 15:09:37 +08001/*
2 * Copyright (C) 2020 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include <linux/if.h>
18#include <linux/pkt_cls.h>
19
20#include "bpf_helpers.h"
21#include "netdbpf/bpf_shared.h"
22
23DEFINE_BPF_MAP(tether_ingress_map, HASH, TetherIngressKey, TetherIngressValue, 64)
24
Maciej Żenczykowski0510b012020-02-12 05:03:05 -080025// Tethering stats, indexed by upstream interface.
26DEFINE_BPF_MAP(tether_stats_map, HASH, uint32_t, TetherStatsValue, 16)
27
Hungming Chen41b2ae12020-02-04 15:09:37 +080028SEC("schedcls/ingress/tether_ether")
29int sched_cls_ingress_tether_ether(struct __sk_buff* skb) {
30 // TODO
31 return TC_ACT_OK;
32}
33
34SEC("schedcls/ingress/tether_rawip")
35int sched_cls_ingress_tether_rawip(struct __sk_buff* skb) {
36 // TODO
37 return TC_ACT_OK;
38}
39
40char _license[] SEC("license") = "Apache 2.0";