blob: fb31b367105cac0bfa5f2c1d0f1a236387718da2 [file] [log] [blame]
Maciej Żenczykowskidca6ce72019-03-07 16:54:12 -08001/*
2 * Copyright (C) 2019 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/pkt_cls.h>
18#include "bpf_helpers.h"
19#include "netdbpf/bpf_shared.h"
20
21struct bpf_map_def SEC("maps") clat_map = {
22 .type = BPF_MAP_TYPE_HASH,
23 .key_size = sizeof(struct ClatKey),
24 .value_size = sizeof(struct ClatValue),
25 .max_entries = 16,
26};
27
28SEC("schedcls/ingress/clat_ether")
29int sched_cls_ingress_clat_ether(struct __sk_buff* skb) {
30 return TC_ACT_OK;
31}
32
33SEC("schedcls/ingress/clat_rawip")
34int sched_cls_ingress_clat_rawip(struct __sk_buff* skb) {
35 return TC_ACT_OK;
36}
37
38char _license[] SEC("license") = "Apache 2.0";