me.bechberger.ebpf.bpf.raw.bpf_sock_ops Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rawbpf Show documentation
Show all versions of rawbpf Show documentation
Raw Panama bindings for libbpf generated for jextract on 64-bit Linux
The newest version!
// Generated by jextract
package me.bechberger.ebpf.bpf.raw;
import java.lang.invoke.*;
import java.lang.foreign.*;
import java.nio.ByteOrder;
import java.util.*;
import java.util.function.*;
import java.util.stream.*;
import static java.lang.foreign.ValueLayout.*;
import static java.lang.foreign.MemoryLayout.PathElement.*;
/**
* {@snippet lang=c :
* struct bpf_sock_ops {
* __u32 op;
* union {
* __u32 args[4];
* __u32 reply;
* __u32 replylong[4];
* };
* __u32 family;
* __u32 remote_ip4;
* __u32 local_ip4;
* __u32 remote_ip6[4];
* __u32 local_ip6[4];
* __u32 remote_port;
* __u32 local_port;
* __u32 is_fullsock;
* __u32 snd_cwnd;
* __u32 srtt_us;
* __u32 bpf_sock_ops_cb_flags;
* __u32 state;
* __u32 rtt_min;
* __u32 snd_ssthresh;
* __u32 rcv_nxt;
* __u32 snd_nxt;
* __u32 snd_una;
* __u32 mss_cache;
* __u32 ecn_flags;
* __u32 rate_delivered;
* __u32 rate_interval_us;
* __u32 packets_out;
* __u32 retrans_out;
* __u32 total_retrans;
* __u32 segs_in;
* __u32 data_segs_in;
* __u32 segs_out;
* __u32 data_segs_out;
* __u32 lost_out;
* __u32 sacked_out;
* __u32 sk_txhash;
* __u64 bytes_received;
* __u64 bytes_acked;
* union {
* struct bpf_sock *sk;
* __u64 : 64;
* };
* union {
* void *skb_data;
* __u64 : 64;
* };
* union {
* void *skb_data_end;
* __u64 : 64;
* };
* __u32 skb_len;
* __u32 skb_tcp_flags;
* __u64 skb_hwtstamp;
* }
* }
*/
public class bpf_sock_ops {
bpf_sock_ops() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
Lib.C_INT.withName("op"),
MemoryLayout.unionLayout(
MemoryLayout.sequenceLayout(4, Lib.C_INT).withName("args"),
Lib.C_INT.withName("reply"),
MemoryLayout.sequenceLayout(4, Lib.C_INT).withName("replylong")
).withName("$anon$6771:2"),
Lib.C_INT.withName("family"),
Lib.C_INT.withName("remote_ip4"),
Lib.C_INT.withName("local_ip4"),
MemoryLayout.sequenceLayout(4, Lib.C_INT).withName("remote_ip6"),
MemoryLayout.sequenceLayout(4, Lib.C_INT).withName("local_ip6"),
Lib.C_INT.withName("remote_port"),
Lib.C_INT.withName("local_port"),
Lib.C_INT.withName("is_fullsock"),
Lib.C_INT.withName("snd_cwnd"),
Lib.C_INT.withName("srtt_us"),
Lib.C_INT.withName("bpf_sock_ops_cb_flags"),
Lib.C_INT.withName("state"),
Lib.C_INT.withName("rtt_min"),
Lib.C_INT.withName("snd_ssthresh"),
Lib.C_INT.withName("rcv_nxt"),
Lib.C_INT.withName("snd_nxt"),
Lib.C_INT.withName("snd_una"),
Lib.C_INT.withName("mss_cache"),
Lib.C_INT.withName("ecn_flags"),
Lib.C_INT.withName("rate_delivered"),
Lib.C_INT.withName("rate_interval_us"),
Lib.C_INT.withName("packets_out"),
Lib.C_INT.withName("retrans_out"),
Lib.C_INT.withName("total_retrans"),
Lib.C_INT.withName("segs_in"),
Lib.C_INT.withName("data_segs_in"),
Lib.C_INT.withName("segs_out"),
Lib.C_INT.withName("data_segs_out"),
Lib.C_INT.withName("lost_out"),
Lib.C_INT.withName("sacked_out"),
Lib.C_INT.withName("sk_txhash"),
Lib.C_LONG_LONG.withName("bytes_received"),
Lib.C_LONG_LONG.withName("bytes_acked"),
MemoryLayout.unionLayout(
Lib.C_POINTER.withName("sk")
).withName("$anon$6812:2"),
MemoryLayout.unionLayout(
Lib.C_POINTER.withName("skb_data")
).withName("$anon$6827:2"),
MemoryLayout.unionLayout(
Lib.C_POINTER.withName("skb_data_end")
).withName("$anon$6828:2"),
Lib.C_INT.withName("skb_len"),
Lib.C_INT.withName("skb_tcp_flags"),
Lib.C_LONG_LONG.withName("skb_hwtstamp")
).withName("bpf_sock_ops");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final OfInt op$LAYOUT = (OfInt)$LAYOUT.select(groupElement("op"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 op
* }
*/
public static final OfInt op$layout() {
return op$LAYOUT;
}
private static final long op$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 op
* }
*/
public static final long op$offset() {
return op$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 op
* }
*/
public static int op(MemorySegment struct) {
return struct.get(op$LAYOUT, op$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 op
* }
*/
public static void op(MemorySegment struct, int fieldValue) {
struct.set(op$LAYOUT, op$OFFSET, fieldValue);
}
private static final SequenceLayout args$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("$anon$6771:2"), groupElement("args"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 args[4]
* }
*/
public static final SequenceLayout args$layout() {
return args$LAYOUT;
}
private static final long args$OFFSET = 4;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 args[4]
* }
*/
public static final long args$offset() {
return args$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 args[4]
* }
*/
public static MemorySegment args(MemorySegment struct) {
return struct.asSlice(args$OFFSET, args$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 args[4]
* }
*/
public static void args(MemorySegment struct, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, struct, args$OFFSET, args$LAYOUT.byteSize());
}
private static long[] args$DIMS = { 4 };
/**
* Dimensions for array field:
* {@snippet lang=c :
* __u32 args[4]
* }
*/
public static long[] args$dimensions() {
return args$DIMS;
}
private static final VarHandle args$ELEM_HANDLE = args$LAYOUT.varHandle(sequenceElement());
/**
* Indexed getter for field:
* {@snippet lang=c :
* __u32 args[4]
* }
*/
public static int args(MemorySegment struct, long index0) {
return (int)args$ELEM_HANDLE.get(struct, 0L, index0);
}
/**
* Indexed setter for field:
* {@snippet lang=c :
* __u32 args[4]
* }
*/
public static void args(MemorySegment struct, long index0, int fieldValue) {
args$ELEM_HANDLE.set(struct, 0L, index0, fieldValue);
}
private static final OfInt reply$LAYOUT = (OfInt)$LAYOUT.select(groupElement("$anon$6771:2"), groupElement("reply"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 reply
* }
*/
public static final OfInt reply$layout() {
return reply$LAYOUT;
}
private static final long reply$OFFSET = 4;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 reply
* }
*/
public static final long reply$offset() {
return reply$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 reply
* }
*/
public static int reply(MemorySegment struct) {
return struct.get(reply$LAYOUT, reply$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 reply
* }
*/
public static void reply(MemorySegment struct, int fieldValue) {
struct.set(reply$LAYOUT, reply$OFFSET, fieldValue);
}
private static final SequenceLayout replylong$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("$anon$6771:2"), groupElement("replylong"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 replylong[4]
* }
*/
public static final SequenceLayout replylong$layout() {
return replylong$LAYOUT;
}
private static final long replylong$OFFSET = 4;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 replylong[4]
* }
*/
public static final long replylong$offset() {
return replylong$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 replylong[4]
* }
*/
public static MemorySegment replylong(MemorySegment struct) {
return struct.asSlice(replylong$OFFSET, replylong$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 replylong[4]
* }
*/
public static void replylong(MemorySegment struct, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, struct, replylong$OFFSET, replylong$LAYOUT.byteSize());
}
private static long[] replylong$DIMS = { 4 };
/**
* Dimensions for array field:
* {@snippet lang=c :
* __u32 replylong[4]
* }
*/
public static long[] replylong$dimensions() {
return replylong$DIMS;
}
private static final VarHandle replylong$ELEM_HANDLE = replylong$LAYOUT.varHandle(sequenceElement());
/**
* Indexed getter for field:
* {@snippet lang=c :
* __u32 replylong[4]
* }
*/
public static int replylong(MemorySegment struct, long index0) {
return (int)replylong$ELEM_HANDLE.get(struct, 0L, index0);
}
/**
* Indexed setter for field:
* {@snippet lang=c :
* __u32 replylong[4]
* }
*/
public static void replylong(MemorySegment struct, long index0, int fieldValue) {
replylong$ELEM_HANDLE.set(struct, 0L, index0, fieldValue);
}
private static final OfInt family$LAYOUT = (OfInt)$LAYOUT.select(groupElement("family"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 family
* }
*/
public static final OfInt family$layout() {
return family$LAYOUT;
}
private static final long family$OFFSET = 20;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 family
* }
*/
public static final long family$offset() {
return family$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 family
* }
*/
public static int family(MemorySegment struct) {
return struct.get(family$LAYOUT, family$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 family
* }
*/
public static void family(MemorySegment struct, int fieldValue) {
struct.set(family$LAYOUT, family$OFFSET, fieldValue);
}
private static final OfInt remote_ip4$LAYOUT = (OfInt)$LAYOUT.select(groupElement("remote_ip4"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 remote_ip4
* }
*/
public static final OfInt remote_ip4$layout() {
return remote_ip4$LAYOUT;
}
private static final long remote_ip4$OFFSET = 24;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 remote_ip4
* }
*/
public static final long remote_ip4$offset() {
return remote_ip4$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 remote_ip4
* }
*/
public static int remote_ip4(MemorySegment struct) {
return struct.get(remote_ip4$LAYOUT, remote_ip4$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 remote_ip4
* }
*/
public static void remote_ip4(MemorySegment struct, int fieldValue) {
struct.set(remote_ip4$LAYOUT, remote_ip4$OFFSET, fieldValue);
}
private static final OfInt local_ip4$LAYOUT = (OfInt)$LAYOUT.select(groupElement("local_ip4"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 local_ip4
* }
*/
public static final OfInt local_ip4$layout() {
return local_ip4$LAYOUT;
}
private static final long local_ip4$OFFSET = 28;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 local_ip4
* }
*/
public static final long local_ip4$offset() {
return local_ip4$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 local_ip4
* }
*/
public static int local_ip4(MemorySegment struct) {
return struct.get(local_ip4$LAYOUT, local_ip4$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 local_ip4
* }
*/
public static void local_ip4(MemorySegment struct, int fieldValue) {
struct.set(local_ip4$LAYOUT, local_ip4$OFFSET, fieldValue);
}
private static final SequenceLayout remote_ip6$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("remote_ip6"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 remote_ip6[4]
* }
*/
public static final SequenceLayout remote_ip6$layout() {
return remote_ip6$LAYOUT;
}
private static final long remote_ip6$OFFSET = 32;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 remote_ip6[4]
* }
*/
public static final long remote_ip6$offset() {
return remote_ip6$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 remote_ip6[4]
* }
*/
public static MemorySegment remote_ip6(MemorySegment struct) {
return struct.asSlice(remote_ip6$OFFSET, remote_ip6$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 remote_ip6[4]
* }
*/
public static void remote_ip6(MemorySegment struct, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, struct, remote_ip6$OFFSET, remote_ip6$LAYOUT.byteSize());
}
private static long[] remote_ip6$DIMS = { 4 };
/**
* Dimensions for array field:
* {@snippet lang=c :
* __u32 remote_ip6[4]
* }
*/
public static long[] remote_ip6$dimensions() {
return remote_ip6$DIMS;
}
private static final VarHandle remote_ip6$ELEM_HANDLE = remote_ip6$LAYOUT.varHandle(sequenceElement());
/**
* Indexed getter for field:
* {@snippet lang=c :
* __u32 remote_ip6[4]
* }
*/
public static int remote_ip6(MemorySegment struct, long index0) {
return (int)remote_ip6$ELEM_HANDLE.get(struct, 0L, index0);
}
/**
* Indexed setter for field:
* {@snippet lang=c :
* __u32 remote_ip6[4]
* }
*/
public static void remote_ip6(MemorySegment struct, long index0, int fieldValue) {
remote_ip6$ELEM_HANDLE.set(struct, 0L, index0, fieldValue);
}
private static final SequenceLayout local_ip6$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("local_ip6"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 local_ip6[4]
* }
*/
public static final SequenceLayout local_ip6$layout() {
return local_ip6$LAYOUT;
}
private static final long local_ip6$OFFSET = 48;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 local_ip6[4]
* }
*/
public static final long local_ip6$offset() {
return local_ip6$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 local_ip6[4]
* }
*/
public static MemorySegment local_ip6(MemorySegment struct) {
return struct.asSlice(local_ip6$OFFSET, local_ip6$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 local_ip6[4]
* }
*/
public static void local_ip6(MemorySegment struct, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, struct, local_ip6$OFFSET, local_ip6$LAYOUT.byteSize());
}
private static long[] local_ip6$DIMS = { 4 };
/**
* Dimensions for array field:
* {@snippet lang=c :
* __u32 local_ip6[4]
* }
*/
public static long[] local_ip6$dimensions() {
return local_ip6$DIMS;
}
private static final VarHandle local_ip6$ELEM_HANDLE = local_ip6$LAYOUT.varHandle(sequenceElement());
/**
* Indexed getter for field:
* {@snippet lang=c :
* __u32 local_ip6[4]
* }
*/
public static int local_ip6(MemorySegment struct, long index0) {
return (int)local_ip6$ELEM_HANDLE.get(struct, 0L, index0);
}
/**
* Indexed setter for field:
* {@snippet lang=c :
* __u32 local_ip6[4]
* }
*/
public static void local_ip6(MemorySegment struct, long index0, int fieldValue) {
local_ip6$ELEM_HANDLE.set(struct, 0L, index0, fieldValue);
}
private static final OfInt remote_port$LAYOUT = (OfInt)$LAYOUT.select(groupElement("remote_port"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 remote_port
* }
*/
public static final OfInt remote_port$layout() {
return remote_port$LAYOUT;
}
private static final long remote_port$OFFSET = 64;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 remote_port
* }
*/
public static final long remote_port$offset() {
return remote_port$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 remote_port
* }
*/
public static int remote_port(MemorySegment struct) {
return struct.get(remote_port$LAYOUT, remote_port$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 remote_port
* }
*/
public static void remote_port(MemorySegment struct, int fieldValue) {
struct.set(remote_port$LAYOUT, remote_port$OFFSET, fieldValue);
}
private static final OfInt local_port$LAYOUT = (OfInt)$LAYOUT.select(groupElement("local_port"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 local_port
* }
*/
public static final OfInt local_port$layout() {
return local_port$LAYOUT;
}
private static final long local_port$OFFSET = 68;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 local_port
* }
*/
public static final long local_port$offset() {
return local_port$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 local_port
* }
*/
public static int local_port(MemorySegment struct) {
return struct.get(local_port$LAYOUT, local_port$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 local_port
* }
*/
public static void local_port(MemorySegment struct, int fieldValue) {
struct.set(local_port$LAYOUT, local_port$OFFSET, fieldValue);
}
private static final OfInt is_fullsock$LAYOUT = (OfInt)$LAYOUT.select(groupElement("is_fullsock"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 is_fullsock
* }
*/
public static final OfInt is_fullsock$layout() {
return is_fullsock$LAYOUT;
}
private static final long is_fullsock$OFFSET = 72;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 is_fullsock
* }
*/
public static final long is_fullsock$offset() {
return is_fullsock$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 is_fullsock
* }
*/
public static int is_fullsock(MemorySegment struct) {
return struct.get(is_fullsock$LAYOUT, is_fullsock$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 is_fullsock
* }
*/
public static void is_fullsock(MemorySegment struct, int fieldValue) {
struct.set(is_fullsock$LAYOUT, is_fullsock$OFFSET, fieldValue);
}
private static final OfInt snd_cwnd$LAYOUT = (OfInt)$LAYOUT.select(groupElement("snd_cwnd"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 snd_cwnd
* }
*/
public static final OfInt snd_cwnd$layout() {
return snd_cwnd$LAYOUT;
}
private static final long snd_cwnd$OFFSET = 76;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 snd_cwnd
* }
*/
public static final long snd_cwnd$offset() {
return snd_cwnd$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 snd_cwnd
* }
*/
public static int snd_cwnd(MemorySegment struct) {
return struct.get(snd_cwnd$LAYOUT, snd_cwnd$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 snd_cwnd
* }
*/
public static void snd_cwnd(MemorySegment struct, int fieldValue) {
struct.set(snd_cwnd$LAYOUT, snd_cwnd$OFFSET, fieldValue);
}
private static final OfInt srtt_us$LAYOUT = (OfInt)$LAYOUT.select(groupElement("srtt_us"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 srtt_us
* }
*/
public static final OfInt srtt_us$layout() {
return srtt_us$LAYOUT;
}
private static final long srtt_us$OFFSET = 80;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 srtt_us
* }
*/
public static final long srtt_us$offset() {
return srtt_us$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 srtt_us
* }
*/
public static int srtt_us(MemorySegment struct) {
return struct.get(srtt_us$LAYOUT, srtt_us$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 srtt_us
* }
*/
public static void srtt_us(MemorySegment struct, int fieldValue) {
struct.set(srtt_us$LAYOUT, srtt_us$OFFSET, fieldValue);
}
private static final OfInt bpf_sock_ops_cb_flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("bpf_sock_ops_cb_flags"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 bpf_sock_ops_cb_flags
* }
*/
public static final OfInt bpf_sock_ops_cb_flags$layout() {
return bpf_sock_ops_cb_flags$LAYOUT;
}
private static final long bpf_sock_ops_cb_flags$OFFSET = 84;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 bpf_sock_ops_cb_flags
* }
*/
public static final long bpf_sock_ops_cb_flags$offset() {
return bpf_sock_ops_cb_flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 bpf_sock_ops_cb_flags
* }
*/
public static int bpf_sock_ops_cb_flags(MemorySegment struct) {
return struct.get(bpf_sock_ops_cb_flags$LAYOUT, bpf_sock_ops_cb_flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 bpf_sock_ops_cb_flags
* }
*/
public static void bpf_sock_ops_cb_flags(MemorySegment struct, int fieldValue) {
struct.set(bpf_sock_ops_cb_flags$LAYOUT, bpf_sock_ops_cb_flags$OFFSET, fieldValue);
}
private static final OfInt state$LAYOUT = (OfInt)$LAYOUT.select(groupElement("state"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 state
* }
*/
public static final OfInt state$layout() {
return state$LAYOUT;
}
private static final long state$OFFSET = 88;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 state
* }
*/
public static final long state$offset() {
return state$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 state
* }
*/
public static int state(MemorySegment struct) {
return struct.get(state$LAYOUT, state$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 state
* }
*/
public static void state(MemorySegment struct, int fieldValue) {
struct.set(state$LAYOUT, state$OFFSET, fieldValue);
}
private static final OfInt rtt_min$LAYOUT = (OfInt)$LAYOUT.select(groupElement("rtt_min"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 rtt_min
* }
*/
public static final OfInt rtt_min$layout() {
return rtt_min$LAYOUT;
}
private static final long rtt_min$OFFSET = 92;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 rtt_min
* }
*/
public static final long rtt_min$offset() {
return rtt_min$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 rtt_min
* }
*/
public static int rtt_min(MemorySegment struct) {
return struct.get(rtt_min$LAYOUT, rtt_min$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 rtt_min
* }
*/
public static void rtt_min(MemorySegment struct, int fieldValue) {
struct.set(rtt_min$LAYOUT, rtt_min$OFFSET, fieldValue);
}
private static final OfInt snd_ssthresh$LAYOUT = (OfInt)$LAYOUT.select(groupElement("snd_ssthresh"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 snd_ssthresh
* }
*/
public static final OfInt snd_ssthresh$layout() {
return snd_ssthresh$LAYOUT;
}
private static final long snd_ssthresh$OFFSET = 96;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 snd_ssthresh
* }
*/
public static final long snd_ssthresh$offset() {
return snd_ssthresh$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 snd_ssthresh
* }
*/
public static int snd_ssthresh(MemorySegment struct) {
return struct.get(snd_ssthresh$LAYOUT, snd_ssthresh$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 snd_ssthresh
* }
*/
public static void snd_ssthresh(MemorySegment struct, int fieldValue) {
struct.set(snd_ssthresh$LAYOUT, snd_ssthresh$OFFSET, fieldValue);
}
private static final OfInt rcv_nxt$LAYOUT = (OfInt)$LAYOUT.select(groupElement("rcv_nxt"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 rcv_nxt
* }
*/
public static final OfInt rcv_nxt$layout() {
return rcv_nxt$LAYOUT;
}
private static final long rcv_nxt$OFFSET = 100;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 rcv_nxt
* }
*/
public static final long rcv_nxt$offset() {
return rcv_nxt$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 rcv_nxt
* }
*/
public static int rcv_nxt(MemorySegment struct) {
return struct.get(rcv_nxt$LAYOUT, rcv_nxt$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 rcv_nxt
* }
*/
public static void rcv_nxt(MemorySegment struct, int fieldValue) {
struct.set(rcv_nxt$LAYOUT, rcv_nxt$OFFSET, fieldValue);
}
private static final OfInt snd_nxt$LAYOUT = (OfInt)$LAYOUT.select(groupElement("snd_nxt"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 snd_nxt
* }
*/
public static final OfInt snd_nxt$layout() {
return snd_nxt$LAYOUT;
}
private static final long snd_nxt$OFFSET = 104;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 snd_nxt
* }
*/
public static final long snd_nxt$offset() {
return snd_nxt$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 snd_nxt
* }
*/
public static int snd_nxt(MemorySegment struct) {
return struct.get(snd_nxt$LAYOUT, snd_nxt$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 snd_nxt
* }
*/
public static void snd_nxt(MemorySegment struct, int fieldValue) {
struct.set(snd_nxt$LAYOUT, snd_nxt$OFFSET, fieldValue);
}
private static final OfInt snd_una$LAYOUT = (OfInt)$LAYOUT.select(groupElement("snd_una"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 snd_una
* }
*/
public static final OfInt snd_una$layout() {
return snd_una$LAYOUT;
}
private static final long snd_una$OFFSET = 108;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 snd_una
* }
*/
public static final long snd_una$offset() {
return snd_una$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 snd_una
* }
*/
public static int snd_una(MemorySegment struct) {
return struct.get(snd_una$LAYOUT, snd_una$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 snd_una
* }
*/
public static void snd_una(MemorySegment struct, int fieldValue) {
struct.set(snd_una$LAYOUT, snd_una$OFFSET, fieldValue);
}
private static final OfInt mss_cache$LAYOUT = (OfInt)$LAYOUT.select(groupElement("mss_cache"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 mss_cache
* }
*/
public static final OfInt mss_cache$layout() {
return mss_cache$LAYOUT;
}
private static final long mss_cache$OFFSET = 112;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 mss_cache
* }
*/
public static final long mss_cache$offset() {
return mss_cache$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 mss_cache
* }
*/
public static int mss_cache(MemorySegment struct) {
return struct.get(mss_cache$LAYOUT, mss_cache$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 mss_cache
* }
*/
public static void mss_cache(MemorySegment struct, int fieldValue) {
struct.set(mss_cache$LAYOUT, mss_cache$OFFSET, fieldValue);
}
private static final OfInt ecn_flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("ecn_flags"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 ecn_flags
* }
*/
public static final OfInt ecn_flags$layout() {
return ecn_flags$LAYOUT;
}
private static final long ecn_flags$OFFSET = 116;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 ecn_flags
* }
*/
public static final long ecn_flags$offset() {
return ecn_flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 ecn_flags
* }
*/
public static int ecn_flags(MemorySegment struct) {
return struct.get(ecn_flags$LAYOUT, ecn_flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 ecn_flags
* }
*/
public static void ecn_flags(MemorySegment struct, int fieldValue) {
struct.set(ecn_flags$LAYOUT, ecn_flags$OFFSET, fieldValue);
}
private static final OfInt rate_delivered$LAYOUT = (OfInt)$LAYOUT.select(groupElement("rate_delivered"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 rate_delivered
* }
*/
public static final OfInt rate_delivered$layout() {
return rate_delivered$LAYOUT;
}
private static final long rate_delivered$OFFSET = 120;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 rate_delivered
* }
*/
public static final long rate_delivered$offset() {
return rate_delivered$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 rate_delivered
* }
*/
public static int rate_delivered(MemorySegment struct) {
return struct.get(rate_delivered$LAYOUT, rate_delivered$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 rate_delivered
* }
*/
public static void rate_delivered(MemorySegment struct, int fieldValue) {
struct.set(rate_delivered$LAYOUT, rate_delivered$OFFSET, fieldValue);
}
private static final OfInt rate_interval_us$LAYOUT = (OfInt)$LAYOUT.select(groupElement("rate_interval_us"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 rate_interval_us
* }
*/
public static final OfInt rate_interval_us$layout() {
return rate_interval_us$LAYOUT;
}
private static final long rate_interval_us$OFFSET = 124;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 rate_interval_us
* }
*/
public static final long rate_interval_us$offset() {
return rate_interval_us$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 rate_interval_us
* }
*/
public static int rate_interval_us(MemorySegment struct) {
return struct.get(rate_interval_us$LAYOUT, rate_interval_us$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 rate_interval_us
* }
*/
public static void rate_interval_us(MemorySegment struct, int fieldValue) {
struct.set(rate_interval_us$LAYOUT, rate_interval_us$OFFSET, fieldValue);
}
private static final OfInt packets_out$LAYOUT = (OfInt)$LAYOUT.select(groupElement("packets_out"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 packets_out
* }
*/
public static final OfInt packets_out$layout() {
return packets_out$LAYOUT;
}
private static final long packets_out$OFFSET = 128;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 packets_out
* }
*/
public static final long packets_out$offset() {
return packets_out$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 packets_out
* }
*/
public static int packets_out(MemorySegment struct) {
return struct.get(packets_out$LAYOUT, packets_out$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 packets_out
* }
*/
public static void packets_out(MemorySegment struct, int fieldValue) {
struct.set(packets_out$LAYOUT, packets_out$OFFSET, fieldValue);
}
private static final OfInt retrans_out$LAYOUT = (OfInt)$LAYOUT.select(groupElement("retrans_out"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 retrans_out
* }
*/
public static final OfInt retrans_out$layout() {
return retrans_out$LAYOUT;
}
private static final long retrans_out$OFFSET = 132;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 retrans_out
* }
*/
public static final long retrans_out$offset() {
return retrans_out$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 retrans_out
* }
*/
public static int retrans_out(MemorySegment struct) {
return struct.get(retrans_out$LAYOUT, retrans_out$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 retrans_out
* }
*/
public static void retrans_out(MemorySegment struct, int fieldValue) {
struct.set(retrans_out$LAYOUT, retrans_out$OFFSET, fieldValue);
}
private static final OfInt total_retrans$LAYOUT = (OfInt)$LAYOUT.select(groupElement("total_retrans"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 total_retrans
* }
*/
public static final OfInt total_retrans$layout() {
return total_retrans$LAYOUT;
}
private static final long total_retrans$OFFSET = 136;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 total_retrans
* }
*/
public static final long total_retrans$offset() {
return total_retrans$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 total_retrans
* }
*/
public static int total_retrans(MemorySegment struct) {
return struct.get(total_retrans$LAYOUT, total_retrans$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 total_retrans
* }
*/
public static void total_retrans(MemorySegment struct, int fieldValue) {
struct.set(total_retrans$LAYOUT, total_retrans$OFFSET, fieldValue);
}
private static final OfInt segs_in$LAYOUT = (OfInt)$LAYOUT.select(groupElement("segs_in"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 segs_in
* }
*/
public static final OfInt segs_in$layout() {
return segs_in$LAYOUT;
}
private static final long segs_in$OFFSET = 140;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 segs_in
* }
*/
public static final long segs_in$offset() {
return segs_in$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 segs_in
* }
*/
public static int segs_in(MemorySegment struct) {
return struct.get(segs_in$LAYOUT, segs_in$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 segs_in
* }
*/
public static void segs_in(MemorySegment struct, int fieldValue) {
struct.set(segs_in$LAYOUT, segs_in$OFFSET, fieldValue);
}
private static final OfInt data_segs_in$LAYOUT = (OfInt)$LAYOUT.select(groupElement("data_segs_in"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 data_segs_in
* }
*/
public static final OfInt data_segs_in$layout() {
return data_segs_in$LAYOUT;
}
private static final long data_segs_in$OFFSET = 144;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 data_segs_in
* }
*/
public static final long data_segs_in$offset() {
return data_segs_in$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 data_segs_in
* }
*/
public static int data_segs_in(MemorySegment struct) {
return struct.get(data_segs_in$LAYOUT, data_segs_in$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 data_segs_in
* }
*/
public static void data_segs_in(MemorySegment struct, int fieldValue) {
struct.set(data_segs_in$LAYOUT, data_segs_in$OFFSET, fieldValue);
}
private static final OfInt segs_out$LAYOUT = (OfInt)$LAYOUT.select(groupElement("segs_out"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 segs_out
* }
*/
public static final OfInt segs_out$layout() {
return segs_out$LAYOUT;
}
private static final long segs_out$OFFSET = 148;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 segs_out
* }
*/
public static final long segs_out$offset() {
return segs_out$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 segs_out
* }
*/
public static int segs_out(MemorySegment struct) {
return struct.get(segs_out$LAYOUT, segs_out$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 segs_out
* }
*/
public static void segs_out(MemorySegment struct, int fieldValue) {
struct.set(segs_out$LAYOUT, segs_out$OFFSET, fieldValue);
}
private static final OfInt data_segs_out$LAYOUT = (OfInt)$LAYOUT.select(groupElement("data_segs_out"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 data_segs_out
* }
*/
public static final OfInt data_segs_out$layout() {
return data_segs_out$LAYOUT;
}
private static final long data_segs_out$OFFSET = 152;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 data_segs_out
* }
*/
public static final long data_segs_out$offset() {
return data_segs_out$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 data_segs_out
* }
*/
public static int data_segs_out(MemorySegment struct) {
return struct.get(data_segs_out$LAYOUT, data_segs_out$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 data_segs_out
* }
*/
public static void data_segs_out(MemorySegment struct, int fieldValue) {
struct.set(data_segs_out$LAYOUT, data_segs_out$OFFSET, fieldValue);
}
private static final OfInt lost_out$LAYOUT = (OfInt)$LAYOUT.select(groupElement("lost_out"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 lost_out
* }
*/
public static final OfInt lost_out$layout() {
return lost_out$LAYOUT;
}
private static final long lost_out$OFFSET = 156;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 lost_out
* }
*/
public static final long lost_out$offset() {
return lost_out$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 lost_out
* }
*/
public static int lost_out(MemorySegment struct) {
return struct.get(lost_out$LAYOUT, lost_out$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 lost_out
* }
*/
public static void lost_out(MemorySegment struct, int fieldValue) {
struct.set(lost_out$LAYOUT, lost_out$OFFSET, fieldValue);
}
private static final OfInt sacked_out$LAYOUT = (OfInt)$LAYOUT.select(groupElement("sacked_out"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 sacked_out
* }
*/
public static final OfInt sacked_out$layout() {
return sacked_out$LAYOUT;
}
private static final long sacked_out$OFFSET = 160;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 sacked_out
* }
*/
public static final long sacked_out$offset() {
return sacked_out$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 sacked_out
* }
*/
public static int sacked_out(MemorySegment struct) {
return struct.get(sacked_out$LAYOUT, sacked_out$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 sacked_out
* }
*/
public static void sacked_out(MemorySegment struct, int fieldValue) {
struct.set(sacked_out$LAYOUT, sacked_out$OFFSET, fieldValue);
}
private static final OfInt sk_txhash$LAYOUT = (OfInt)$LAYOUT.select(groupElement("sk_txhash"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 sk_txhash
* }
*/
public static final OfInt sk_txhash$layout() {
return sk_txhash$LAYOUT;
}
private static final long sk_txhash$OFFSET = 164;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 sk_txhash
* }
*/
public static final long sk_txhash$offset() {
return sk_txhash$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 sk_txhash
* }
*/
public static int sk_txhash(MemorySegment struct) {
return struct.get(sk_txhash$LAYOUT, sk_txhash$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 sk_txhash
* }
*/
public static void sk_txhash(MemorySegment struct, int fieldValue) {
struct.set(sk_txhash$LAYOUT, sk_txhash$OFFSET, fieldValue);
}
private static final OfLong bytes_received$LAYOUT = (OfLong)$LAYOUT.select(groupElement("bytes_received"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 bytes_received
* }
*/
public static final OfLong bytes_received$layout() {
return bytes_received$LAYOUT;
}
private static final long bytes_received$OFFSET = 168;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 bytes_received
* }
*/
public static final long bytes_received$offset() {
return bytes_received$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 bytes_received
* }
*/
public static long bytes_received(MemorySegment struct) {
return struct.get(bytes_received$LAYOUT, bytes_received$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 bytes_received
* }
*/
public static void bytes_received(MemorySegment struct, long fieldValue) {
struct.set(bytes_received$LAYOUT, bytes_received$OFFSET, fieldValue);
}
private static final OfLong bytes_acked$LAYOUT = (OfLong)$LAYOUT.select(groupElement("bytes_acked"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 bytes_acked
* }
*/
public static final OfLong bytes_acked$layout() {
return bytes_acked$LAYOUT;
}
private static final long bytes_acked$OFFSET = 176;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 bytes_acked
* }
*/
public static final long bytes_acked$offset() {
return bytes_acked$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 bytes_acked
* }
*/
public static long bytes_acked(MemorySegment struct) {
return struct.get(bytes_acked$LAYOUT, bytes_acked$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 bytes_acked
* }
*/
public static void bytes_acked(MemorySegment struct, long fieldValue) {
struct.set(bytes_acked$LAYOUT, bytes_acked$OFFSET, fieldValue);
}
private static final AddressLayout sk$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("$anon$6812:2"), groupElement("sk"));
/**
* Layout for field:
* {@snippet lang=c :
* struct bpf_sock *sk
* }
*/
public static final AddressLayout sk$layout() {
return sk$LAYOUT;
}
private static final long sk$OFFSET = 184;
/**
* Offset for field:
* {@snippet lang=c :
* struct bpf_sock *sk
* }
*/
public static final long sk$offset() {
return sk$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* struct bpf_sock *sk
* }
*/
public static MemorySegment sk(MemorySegment struct) {
return struct.get(sk$LAYOUT, sk$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* struct bpf_sock *sk
* }
*/
public static void sk(MemorySegment struct, MemorySegment fieldValue) {
struct.set(sk$LAYOUT, sk$OFFSET, fieldValue);
}
private static final AddressLayout skb_data$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("$anon$6827:2"), groupElement("skb_data"));
/**
* Layout for field:
* {@snippet lang=c :
* void *skb_data
* }
*/
public static final AddressLayout skb_data$layout() {
return skb_data$LAYOUT;
}
private static final long skb_data$OFFSET = 192;
/**
* Offset for field:
* {@snippet lang=c :
* void *skb_data
* }
*/
public static final long skb_data$offset() {
return skb_data$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void *skb_data
* }
*/
public static MemorySegment skb_data(MemorySegment struct) {
return struct.get(skb_data$LAYOUT, skb_data$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void *skb_data
* }
*/
public static void skb_data(MemorySegment struct, MemorySegment fieldValue) {
struct.set(skb_data$LAYOUT, skb_data$OFFSET, fieldValue);
}
private static final AddressLayout skb_data_end$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("$anon$6828:2"), groupElement("skb_data_end"));
/**
* Layout for field:
* {@snippet lang=c :
* void *skb_data_end
* }
*/
public static final AddressLayout skb_data_end$layout() {
return skb_data_end$LAYOUT;
}
private static final long skb_data_end$OFFSET = 200;
/**
* Offset for field:
* {@snippet lang=c :
* void *skb_data_end
* }
*/
public static final long skb_data_end$offset() {
return skb_data_end$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void *skb_data_end
* }
*/
public static MemorySegment skb_data_end(MemorySegment struct) {
return struct.get(skb_data_end$LAYOUT, skb_data_end$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void *skb_data_end
* }
*/
public static void skb_data_end(MemorySegment struct, MemorySegment fieldValue) {
struct.set(skb_data_end$LAYOUT, skb_data_end$OFFSET, fieldValue);
}
private static final OfInt skb_len$LAYOUT = (OfInt)$LAYOUT.select(groupElement("skb_len"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 skb_len
* }
*/
public static final OfInt skb_len$layout() {
return skb_len$LAYOUT;
}
private static final long skb_len$OFFSET = 208;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 skb_len
* }
*/
public static final long skb_len$offset() {
return skb_len$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 skb_len
* }
*/
public static int skb_len(MemorySegment struct) {
return struct.get(skb_len$LAYOUT, skb_len$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 skb_len
* }
*/
public static void skb_len(MemorySegment struct, int fieldValue) {
struct.set(skb_len$LAYOUT, skb_len$OFFSET, fieldValue);
}
private static final OfInt skb_tcp_flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("skb_tcp_flags"));
/**
* Layout for field:
* {@snippet lang=c :
* __u32 skb_tcp_flags
* }
*/
public static final OfInt skb_tcp_flags$layout() {
return skb_tcp_flags$LAYOUT;
}
private static final long skb_tcp_flags$OFFSET = 212;
/**
* Offset for field:
* {@snippet lang=c :
* __u32 skb_tcp_flags
* }
*/
public static final long skb_tcp_flags$offset() {
return skb_tcp_flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u32 skb_tcp_flags
* }
*/
public static int skb_tcp_flags(MemorySegment struct) {
return struct.get(skb_tcp_flags$LAYOUT, skb_tcp_flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u32 skb_tcp_flags
* }
*/
public static void skb_tcp_flags(MemorySegment struct, int fieldValue) {
struct.set(skb_tcp_flags$LAYOUT, skb_tcp_flags$OFFSET, fieldValue);
}
private static final OfLong skb_hwtstamp$LAYOUT = (OfLong)$LAYOUT.select(groupElement("skb_hwtstamp"));
/**
* Layout for field:
* {@snippet lang=c :
* __u64 skb_hwtstamp
* }
*/
public static final OfLong skb_hwtstamp$layout() {
return skb_hwtstamp$LAYOUT;
}
private static final long skb_hwtstamp$OFFSET = 216;
/**
* Offset for field:
* {@snippet lang=c :
* __u64 skb_hwtstamp
* }
*/
public static final long skb_hwtstamp$offset() {
return skb_hwtstamp$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* __u64 skb_hwtstamp
* }
*/
public static long skb_hwtstamp(MemorySegment struct) {
return struct.get(skb_hwtstamp$LAYOUT, skb_hwtstamp$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* __u64 skb_hwtstamp
* }
*/
public static void skb_hwtstamp(MemorySegment struct, long fieldValue) {
struct.set(skb_hwtstamp$LAYOUT, skb_hwtstamp$OFFSET, fieldValue);
}
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
*/
public static MemorySegment asSlice(MemorySegment array, long index) {
return array.asSlice(layout().byteSize() * index);
}
/**
* The size (in bytes) of this struct
*/
public static long sizeof() { return layout().byteSize(); }
/**
* Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
*/
public static MemorySegment allocate(SegmentAllocator allocator) {
return allocator.allocate(layout());
}
/**
* Allocate an array of size {@code elementCount} using {@code allocator}.
* The returned segment has size {@code elementCount * layout().byteSize()}.
*/
public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
return reinterpret(addr, 1, arena, cleanup);
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
}
}