github.com/cilium/cilium@v1.16.2/bpf/bpf_alignchecker.c (about)

     1  // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
     2  /* Copyright Authors of Cilium */
     3  
     4  #define DEBUG
     5  #define TRACE_NOTIFY
     6  #define DROP_NOTIFY
     7  #define POLICY_VERDICT_NOTIFY
     8  #define ENABLE_CAPTURE
     9  #define TRACE_SOCK_NOTIFY
    10  
    11  #include <bpf/ctx/unspec.h>
    12  
    13  #include "node_config.h"
    14  #include "lib/common.h"
    15  #include "lib/maps.h"
    16  #include "lib/nat.h"
    17  #include "lib/trace.h"
    18  #include "lib/policy_log.h"
    19  #include "lib/pcap.h"
    20  #include "lib/trace_sock.h"
    21  #include "lib/mcast.h"
    22  
    23  /*
    24   * The __COUNTER__ macro expands to an integer value which is increasing every
    25   * time the macro is used.  Extra macros are required so that the __COUNTER__
    26   * value is actually expanded before concatenation with the _ prefix.  Thus,
    27   * the first occurrence of add_type(TYPE) will expand to "TYPE _0", the second
    28   * to "TYPE _1", etc.
    29   */
    30  #define __add_type(TYPE, N) TYPE _ ## N
    31  #define __expand(TYPE, N) __add_type(TYPE, N)
    32  #define add_type(TYPE) __expand(TYPE, __COUNTER__)
    33  
    34  add_type(struct ipv4_ct_tuple);
    35  add_type(struct ipv6_ct_tuple);
    36  add_type(struct ct_entry);
    37  add_type(struct ipcache_key);
    38  add_type(struct remote_endpoint_info);
    39  add_type(struct lb4_key);
    40  add_type(struct lb4_service);
    41  add_type(struct lb4_backend);
    42  add_type(struct lb6_key);
    43  add_type(struct lb6_service);
    44  add_type(struct lb6_backend);
    45  add_type(struct endpoint_key);
    46  add_type(struct endpoint_info);
    47  add_type(struct metrics_key);
    48  add_type(struct metrics_value);
    49  add_type(struct policy_key);
    50  add_type(struct policy_entry);
    51  add_type(struct ipv4_nat_entry);
    52  add_type(struct ipv6_nat_entry);
    53  add_type(struct trace_notify);
    54  add_type(struct drop_notify);
    55  add_type(struct policy_verdict_notify);
    56  add_type(struct debug_msg);
    57  add_type(struct debug_capture_msg);
    58  add_type(struct ipv4_revnat_tuple);
    59  add_type(struct ipv4_revnat_entry);
    60  add_type(struct ipv6_revnat_tuple);
    61  add_type(struct ipv6_revnat_entry);
    62  add_type(struct ipv4_frag_id);
    63  add_type(struct ipv4_frag_l4ports);
    64  add_type(union macaddr);
    65  add_type(struct lb4_affinity_key);
    66  add_type(struct lb6_affinity_key);
    67  add_type(struct lb_affinity_val);
    68  add_type(struct lb_affinity_match);
    69  add_type(struct lb4_src_range_key);
    70  add_type(struct lb6_src_range_key);
    71  add_type(struct edt_id);
    72  add_type(struct edt_info);
    73  add_type(struct egress_gw_policy_key);
    74  add_type(struct egress_gw_policy_entry);
    75  add_type(struct vtep_key);
    76  add_type(struct vtep_value);
    77  add_type(struct capture4_wcard);
    78  add_type(struct capture6_wcard);
    79  add_type(struct capture_rule);
    80  add_type(struct srv6_vrf_key4);
    81  add_type(struct srv6_vrf_key6);
    82  add_type(struct srv6_policy_key4);
    83  add_type(struct srv6_policy_key6);
    84  add_type(struct trace_sock_notify);
    85  add_type(struct tunnel_key);
    86  add_type(struct tunnel_value);
    87  add_type(struct auth_key);
    88  add_type(struct auth_info);
    89  add_type(struct encrypt_config);
    90  add_type(struct world_cidrs_key4);
    91  add_type(struct mcast_subscriber_v4);
    92  add_type(struct node_key);
    93  add_type(struct skip_lb4_key);
    94  add_type(struct skip_lb6_key);