Helper function bpf_lwt_seg6_action
Definition
Copyright (c) 2015 The Libbpf Authors. All rights reserved.
Apply an IPv6 Segment Routing action of type action to the packet associated to skb. Each action takes a parameter contained at address param, and of length param_len bytes. action can be one of:
-
SEG6_LOCAL_ACTION_END_X: End.X action: Endpoint with Layer-3 cross-connect. Type of param: struct in6_addr.
-
SEG6_LOCAL_ACTION_END_T: End.T action: Endpoint with specific IPv6 table lookup. Type of param: int.
-
SEG6_LOCAL_ACTION_END_B6: End.B6 action: Endpoint bound to an SRv6 policy. Type of param: struct ipv6_sr_hdr.
-
SEG6_LOCAL_ACTION_END_B6_ENCAP: End.B6.Encap action: Endpoint bound to an SRv6 encapsulation policy. Type of param: struct ipv6_sr_hdr.
A call to this helper is susceptible to change the underlying packet buffer. Therefore, at load time, all checks on pointers previously done by the verifier are invalidated and must be performed again, if the helper is used in combination with direct packet access.
Returns
0 on success, or a negative error in case of failure.
static long (* const bpf_lwt_seg6_action)(struct __sk_buff *skb, __u32 action, void *param, __u32 param_len) = (void *) 76;
Usage
Docs could be improved
This part of the docs is incomplete, contributions are very welcome
Program types
This helper call can be used in the following program types:
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome