~sircmpwn/hare-dev

hare: rt: BPF socket structs & option levels for Linux v1 APPLIED

Blain Smith: 1
 rt: BPF socket structs & option levels for Linux

 1 files changed, 15 insertions(+), 0 deletions(-)
#1121425 alpine.yml success
#1121426 freebsd.yml success
#1121427 openbsd.yml success
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/hare-dev/patches/48078/mbox | git am -3
Learn more about email & git

[PATCH hare] rt: BPF socket structs & option levels for Linux Export this patch

I've been working on a BPF module with my own versions of these structs
and definitions, but I figured it was worth issuing a patch to get
them included in the Linux runtime here. I kept the names of the struct
fields as close as possible to the kernel versions.

Signed-off-by: Blain Smith <rebelgeek@blainsmith.com>
---
 rt/+linux/socket.ha | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/rt/+linux/socket.ha b/rt/+linux/socket.ha
index 988e1514..b9019ee4 100644
--- a/rt/+linux/socket.ha
+++ b/rt/+linux/socket.ha
@@ -86,6 +86,18 @@ export type cmsg = struct {
	cmsg_data: [*]u8,
};

export type sock_filter = struct {
	__code: u16,
	__jt: u8,
	__jf: u8,
	__k: u32,
};

export type sock_fprog = struct {
	__len: u16,
	__filter: *[*]sock_filter,
};

// domain for socket(2)

// Unspecified
@@ -404,6 +416,9 @@ export def SO_PRIORITY: int = 12;
export def SO_LINGER: int = 13;
export def SO_BSDCOMPAT: int = 14;
export def SO_REUSEPORT: int = 15;
export def SO_ATTACH_FILTER: int = 26;
export def SO_DETATCH_FILTER: int = 27;
export def SO_LOCK_FILTER: int = 44;

// the following differ on ppc
export def SO_PASSCRED: int = 16;
-- 
2.34.1
hare/patches: SUCCESS in 1m56s

[rt: BPF socket structs & option levels for Linux][0] from [Blain Smith][1]

[0]: https://lists.sr.ht/~sircmpwn/hare-dev/patches/48078
[1]: mailto:rebelgeek@blainsmith.com

✓ #1121427 SUCCESS hare/patches/openbsd.yml https://builds.sr.ht/~sircmpwn/job/1121427
✓ #1121426 SUCCESS hare/patches/freebsd.yml https://builds.sr.ht/~sircmpwn/job/1121426
✓ #1121425 SUCCESS hare/patches/alpine.yml  https://builds.sr.ht/~sircmpwn/job/1121425
thanks!

to git@git.sr.ht:~sircmpwn/hare
  dbed6d0e..ccd1a08a  master -> master