sysdecode_mask(3)
πΈ NAME πΈ
okay so bestie, welcome to sysdecode_mask(3) from the Library Functions Manual! This is the whole squad whose job is to print name of various bitmask values π
β¨ Here's everyone, exact names and all:
sysdecode_masksysdecode_accessmodesysdecode_atflagssysdecode_capfcntlrightssysdecode_close_range_flagssysdecode_fcntl_fileflagssysdecode_fileflagssysdecode_filemodesysdecode_flock_operationsysdecode_mlockall_flagssysdecode_mmap_flagssysdecode_mmap_protsysdecode_mount_flagssysdecode_msg_flagssysdecode_msync_flagssysdecode_open_flagssysdecode_pipe2_flagssysdecode_pollfd_eventssysdecode_reboot_howtosysdecode_rfork_flagssysdecode_semget_flagssysdecode_sendfile_flagssysdecode_shmat_flagssysdecode_sctp_nxt_flagssysdecode_sctp_rcv_flagssysdecode_sctp_snd_flagssysdecode_socket_typesysdecode_thr_create_flagssysdecode_umtx_cvwait_flagssysdecode_umtx_rwlock_flagssysdecode_vmprotsysdecode_wait4_optionssysdecode_wait6_options
π LIBRARY π
the library is libsysdecode β that's the one, no cap π«Ά
β¨ SYNOPSIS β¨
#include <sysdecode.h>
bool
sysdecode_access_mode(FILE *fp, int mode, int *rem);
bool
sysdecode_atflags(FILE *fp, int flags, int *rem);
bool
sysdecode_cap_fcntlrights(FILE *fp, uint32_t rights, uint32_t *rem);
bool
sysdecode_close_range_flags(FILE *fp, int flags, int *rem);
bool
sysdecode_fcntl_fileflags(FILE *fp, int flags, int *rem);
bool
sysdecode_fileflags(FILE *fp, fflags_t flags, fflags_t *rem);
bool
sysdecode_filemode(FILE *fp, int mode, int *rem);
bool
sysdecode_flock_operation(FILE *fp, int operation, int *rem);
bool
sysdecode_mlockall_flags(FILE *fp, int flags, int *rem);
bool
sysdecode_mmap_flags(FILE *fp, int flags, int *rem);
bool
sysdecode_mmap_prot(FILE *fp, int prot, int *rem);
bool
sysdecode_mount_flags(FILE *fp, int flags, int *rem);
bool
sysdecode_msg_flags(FILE *fp, int flags, int *rem);
bool
sysdecode_msync_flags(FILE *fp, int flags, int *rem);
bool
sysdecode_open_flags(FILE *fp, int flags, int *rem);
bool
sysdecode_pipe2_flags(FILE *fp, int flags, int *rem);
bool
sysdecode_pollfd_events(FILE *fp, int flags, int *rem);
bool
sysdecode_reboot_howto(FILE *fp, int howto, int *rem);
bool
sysdecode_rfork_flags(FILE *fp, int flags, int *rem);
bool
sysdecode_sctp_nxt_flags(FILE *fp, int flags, int *rem);
bool
sysdecode_sctp_rcv_flags(FILE *fp, int flags, int *rem);
bool
sysdecode_sctp_snd_flags(FILE *fp, int flags, int *rem);
bool
sysdecode_semget_flags(FILE *fp, int flags, int *rem);
bool
sysdecode_sendfile_flags(FILE *fp, int flags, int *rem);
bool
sysdecode_shmat_flags(FILE *fp, int flags, int *rem);
bool
sysdecode_socket_type(FILE *fp, int type, int *rem);
bool
sysdecode_thr_create_flags(FILE *fp, int flags, int *rem);
bool
sysdecode_umtx_cvwait_flags(FILE *fp, u_long flags, u_long *rem);
bool
sysdecode_umtx_rwlock_flags(FILE *fp, u_long flags, u_long *rem);
bool
sysdecode_vmprot(FILE *fp, int type, int *rem);
bool
sysdecode_wait4_options(FILE *fp, int options, int *rem);
bool
sysdecode_wait6_options(FILE *fp, int options, int *rem);
π§ DESCRIPTION π§
The sysdecode_mask functions are here to generate a text description of an integer value built from a mask of bitfields. That text description lists the C macros for field values joined by pipe | characters, matching the format used in C source code. Most of the values decoded by these functions are passed as arguments to system calls, though some of these values are used internally in the kernel π
Each function writes the text description to fp. The second argument should contain the integer value to be decoded. The rem argument is set to the value of any bits that were not decoded β aka bit fields that do not have a corresponding C macro. rem may be set to NULL if the caller does not need this value. Each function returns true if any bit fields in the value were decoded and false if no bit fields were decoded β
Most of these functions decode an argument passed to a system call:
sysdecode_access_mode()βaccess(2), argumentmodesysdecode_atflags()βchflagsat(2),fstatat(2), argumentatflag, flagsysdecode_cap_fcntlrights()βcap_fcntls_limit(2), argumentfcntlrightssysdecode_fileflags()βchflags(2), argumentflagssysdecode_filemode()βchmod(2),open(2), argumentmodesysdecode_flock_operation()βflock(2), argumentoperationsysdecode_mlockall_flags()βmlockall(2), argumentflagssysdecode_mmap_flags()βmmap(2), argumentflagssysdecode_mmap_prot()βmmap(2), argumentprotsysdecode_mount_flags()βmount(2), argumentflagssysdecode_msg_flags()βrecv(2),send(2), argumentflagssysdecode_msync_flags()βmsync(2), argumentflagssysdecode_open_flags()βopen(2), argumentflagssysdecode_pipe2_flags()βpipe2, argumentflagssysdecode_reboot_howto()βreboot(2), argumenthowtosysdecode_rfork_flags()βrfork(2), argumentflagssysdecode_semget_flags()βsemget(2), argumentflagssysdecode_sendfile_flags()βsendfile(2), argumentflagssysdecode_shmat_flags()βshmat(2), argumentflagssysdecode_socket_type()βsocket(2), argumenttypesysdecode_thr_create_flags()βthr_create(2), argumentflagssysdecode_wait4_options()βwait4(2), argumentoptionssysdecode_wait6_options()βwait6(2), argumentoptions
Other functions decode the values described below:
sysdecode_fcntl_fileflags()β the file flags used with theF_GETFLandF_SETFLfcntl(2)commands.sysdecode_pollfd_events()β theeventsandreventsmembers of astruct pollfd.sysdecode_sctp_nxt_flags()β thenxt_flagsmember of astruct sctp_nxtinfo.sysdecode_sctp_rcv_flags()β thercv_flagsmember of astruct sctp_rcvinfo.sysdecode_sctp_snd_flags()β thesnd_flagsmember of astruct sctp_sndinfo.sysdecode_umtx_cvwait_flags()β thevalargument to_umtx_op(2)forUMTX_OP_CV_WAIToperations.sysdecode_umtx_rwlock_flags()β thevalargument to_umtx_op(2)forUMTX_OP_RW_RDLOCKoperations.sysdecode_vmprot()β the memory protection flags stored invm_prot_tvariables.
π RETURN VALUES π
The sysdecode_mask functions return true if any bit fields in the value were decoded and false if no bit fields were decoded. That's it, bestie β simple vibe check β
π SEE ALSO π
this page comes from Debian, dated February 29, 2024 β mwah, love u, bye π«Άπ
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2016 John Baldwin <jhb@FreeBSD.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms