Skip to content

Instantly share code, notes, and snippets.

View Maximus-'s full-sized avatar
😣

Max Maximus-

😣
View GitHub Profile
@Maximus-
Maximus- / sendmsg_x.c
Last active March 23, 2024 04:59
Example of macOS sendmsg_x
// ./usr/include/sys/syscall.h:521:#define SYS_sendmsg_x 481
// ./kern/syscalls.master:751:480 AUE_NULL ALL { user_ssize_t recvmsg_x(int s, struct msghdr_x *msgp, u_int cnt, int flags); }
#include <sys/syscall.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>