libfwnt(3)
π¦ libfwnt β the libfwnt(3) library page, bestie edition π
okay so. this is the manual page for the libfwnt library, and it lives in the Library Functions Manual section because of course it does, it's a library, it's giving main character energy β¨
π NAME π
libfwnt.h β a library that supports the common Windows NT specific formats πͺπ
πΈ SYNOPSIS πΈ
first things first, bestie, you gotta let it in:
#include <libfwnt.h>
that's the whole vibe. everything below comes from that one include π«Ά
β Support functions β
const char *
libfwnt_get_version(void);
libfwnt_get_versionβ the little one. no arguments, just vibes, and it hands you back the library version as aconst char *π
π Notify functions π
void
libfwnt_notify_set_verbose(int verbose);
int
libfwnt_notify_set_stream(FILE *stream, libfwnt_error_t **error);
int
libfwnt_notify_stream_open(const char *filename,
libfwnt_error_t **error);
int
libfwnt_notify_stream_close(libfwnt_error_t **error);
libfwnt_notify_set_verboseβ takes anint verbose, returnsvoid. it just wants to know how chatty you wanna be π£οΈlibfwnt_notify_set_streamβ hands in aFILE *streamplus anlibfwnt_error_t **errorslot.libfwnt_notify_stream_openβ opens a notify stream from aconst char *filename, plus thelibfwnt_error_t **errorslot.libfwnt_notify_stream_closeβ closes it back up. just thelibfwnt_error_t **errorslot here, no filename, she's done π
π Error functions π
void
libfwnt_error_free(libfwnt_error_t **error);
int
libfwnt_error_fprint(libfwnt_error_t *error, FILE *stream);
int
libfwnt_error_sprint(libfwnt_error_t *error, char *string, size_t size);
int
libfwnt_error_backtrace_fprint(libfwnt_error_t *error, FILE *stream);
int
libfwnt_error_backtrace_sprint(libfwnt_error_t *error, char *string,
size_t size);
libfwnt_error_freeβ returnsvoid, takes thelibfwnt_error_t **errorand lets it go ποΈlibfwnt_error_fprintβ error + aFILE *stream, prints it out to the stream.libfwnt_error_sprintβ error + achar *string+ asize_t size, prints it into your buffer instead.libfwnt_error_backtrace_fprintβ same asfprintbut with the backtrace, to aFILE *stream.libfwnt_error_backtrace_sprintβ same assprintbut with the backtrace, intochar *stringwith sizesize_t size. the receipts π₯
π‘οΈ Security descriptor functions π‘οΈ
int
libfwnt_security_descriptor_initialize(libfwnt_security_descriptor_t **security_descriptor,
libfwnt_error_t **error);
int
libfwnt_security_descriptor_free(libfwnt_security_descriptor_t **security_descriptor,
libfwnt_error_t **error);
int
libfwnt_security_descriptor_copy_from_byte_stream(libfwnt_security_descriptor_t *security_descriptor,
const uint8_t *byte_stream, size_t byte_stream_size, int byte_order,
libfwnt_error_t **error);
int
libfwnt_security_descriptor_get_owner(libfwnt_security_descriptor_t *security_descriptor,
libfwnt_security_identifier_t **security_identifier,
libfwnt_error_t **error);
int
libfwnt_security_descriptor_get_group(libfwnt_security_descriptor_t *security_descriptor,
libfwnt_security_identifier_t **security_identifier,
libfwnt_error_t **error);
int
libfwnt_security_descriptor_get_discretionary_acl(libfwnt_security_descriptor_t *security_descriptor,
libfwnt_access_control_list_t **access_control_list,
libfwnt_error_t **error);
int
libfwnt_security_descriptor_get_system_acl(libfwnt_security_descriptor_t *security_descriptor,
libfwnt_access_control_list_t **access_control_list,
libfwnt_error_t **error);
libfwnt_security_descriptor_initializeβ takes alibfwnt_security_descriptor_t **security_descriptorand anlibfwnt_error_t **error. sets the whole thing up β¨libfwnt_security_descriptor_freeβ same signature, opposite job: releases it πlibfwnt_security_descriptor_copy_from_byte_streamβ takes the descriptor, aconst uint8_t *byte_stream,size_t byte_stream_size, anint byte_orderand the error slot. copies right out of the raw bytes, no cap π«Άlibfwnt_security_descriptor_get_ownerβ hands you back the owner as alibfwnt_security_identifier_t **security_identifierπlibfwnt_security_descriptor_get_groupβ same deal but for the group. the group chat, literally πlibfwnt_security_descriptor_get_discretionary_aclβ gives you alibfwnt_access_control_list_t **access_control_listfor the discretionary ACL.libfwnt_security_descriptor_get_system_aclβ same thing but for the system ACL. two ACLs, two besties, both iconic π
π Security identifier (SID) functions π
int
libfwnt_security_identifier_initialize(libfwnt_security_identifier_t **security_identifier,
libfwnt_error_t **error);
int
libfwnt_security_identifier_free(libfwnt_security_identifier_t **security_identifier,
libfwnt_error_t **error);
int
libfwnt_security_identifier_copy_from_byte_stream(libfwnt_security_identifier_t *security_identifier,
const uint8_t *byte_stream, size_t byte_stream_size, int byte_order,
libfwnt_error_t **error);
int
libfwnt_security_identifier_get_string_size(libfwnt_security_identifier_t *security_identifier,
size_t *string_size, uint32_t string_format_flags,
libfwnt_error_t **error);
int
libfwnt_security_identifier_copy_to_utf8_string(libfwnt_security_identifier_t *security_identifier,
uint8_t *utf8_string, size_t utf8_string_size,
uint32_t string_format_flags, libfwnt_error_t **error);
int
libfwnt_security_identifier_copy_to_utf8_string_with_index(libfwnt_security_identifier_t *security_identifier,
uint8_t *utf8_string, size_t utf8_string_size,
size_t *utf8_string_index, uint32_t string_format_flags,
libfwnt_error_t **error);
int
libfwnt_security_identifier_copy_to_utf16_string(libfwnt_security_identifier_t *security_identifier,
uint16_t *utf16_string, size_t utf16_string_size,
uint32_t string_format_flags, libfwnt_error_t **error);
int
libfwnt_security_identifier_copy_to_utf16_string_with_index(libfwnt_security_identifier_t *security_identifier,
uint16_t *utf16_string, size_t utf16_string_size,
size_t *utf16_string_index, uint32_t string_format_flags,
libfwnt_error_t **error);
int
libfwnt_security_identifier_copy_to_utf32_string(libfwnt_security_identifier_t *security_identifier,
uint32_t *utf32_string, size_t utf32_string_size,
uint32_t string_format_flags, libfwnt_error_t **error);
int
libfwnt_security_identifier_copy_to_utf32_string_with_index(libfwnt_security_identifier_t *security_identifier,
uint32_t *utf32_string, size_t utf32_string_size,
size_t *utf32_string_index, uint32_t string_format_flags,
libfwnt_error_t **error);
libfwnt_security_identifier_initializeβlibfwnt_security_identifier_t **security_identifier+ error slot. born πlibfwnt_security_identifier_freeβ same signature, says bye π¦libfwnt_security_identifier_copy_from_byte_streamβ descriptor,const uint8_t *byte_stream,size_t byte_stream_size,int byte_order, error slot. the raw-byte pipeline πlibfwnt_security_identifier_get_string_sizeβ gives you the size in asize_t *string_size, and you passuint32_t string_format_flagsto say how you want it formatted πlibfwnt_security_identifier_copy_to_utf8_stringβ writes intouint8_t *utf8_stringof sizesize_t utf8_string_size, withuint32_t string_format_flags. utf8 girlies rise π§libfwnt_security_identifier_copy_to_utf8_string_with_indexβ same but with an extrasize_t *utf8_string_indexso it knows where you're at. no more index anxiety πlibfwnt_security_identifier_copy_to_utf16_stringβ utf16 version, intouint16_t *utf16_string, sizesize_t utf16_string_size, plusuint32_t string_format_flags.libfwnt_security_identifier_copy_to_utf16_string_with_indexβ utf16 with thesize_t *utf16_string_indexglow-up β¨libfwnt_security_identifier_copy_to_utf32_stringβ utf32 version,uint32_t *utf32_string, sizesize_t utf32_string_size, plusuint32_t string_format_flags.libfwnt_security_identifier_copy_to_utf32_string_with_indexβ utf32 withsize_t *utf32_string_index. the whole family ate π₯
π Access control list (ACL) functions π
int
libfwnt_access_control_list_free(libfwnt_access_control_list_t **access_control_list,
libfwnt_error_t **error);
int
libfwnt_access_control_list_get_number_of_entries(libfwnt_access_control_list_t *access_control_list,
int *number_of_entries, libfwnt_error_t **error);
int
libfwnt_access_control_list_get_entry_by_index(libfwnt_access_control_list_t *access_control_list,
int entry_index,
libfwnt_access_control_entry_t **access_control_entry,
libfwnt_error_t **error);
libfwnt_access_control_list_freeβlibfwnt_access_control_list_t **access_control_list+ error slot, releases it.libfwnt_access_control_list_get_number_of_entriesβ puts the count intoint *number_of_entries. math is math πlibfwnt_access_control_list_get_entry_by_indexβ you give it the list, anint entry_index, and alibfwnt_access_control_entry_t **access_control_entryto fill, plus the error slot. pick your fighter by index π―
π« Access control entry (ACE) functions π«
int
libfwnt_access_control_entry_free(libfwnt_access_control_entry_t **access_control_entry,
libfwnt_error_t **error);
int
libfwnt_access_control_entry_get_type(libfwnt_access_control_entry_t *access_control_entry,
uint8_t *type, libfwnt_error_t **error);
int
libfwnt_access_control_entry_get_flags(libfwnt_access_control_entry_t *access_control_entry,
uint8_t *flags, libfwnt_error_t **error);
int
libfwnt_access_control_entry_get_access_mask(libfwnt_access_control_entry_t *access_control_entry,
uint32_t *access_mask, libfwnt_error_t **error);
int
libfwnt_access_control_entry_get_security_identifier(libfwnt_access_control_entry_t *access_control_entry,
libfwnt_security_identifier_t **security_identifier,
libfwnt_error_t **error);
libfwnt_access_control_entry_freeβlibfwnt_access_control_entry_t **access_control_entry+ error slot, cleans up.libfwnt_access_control_entry_get_typeβ drops the type into auint8_t *typeπlibfwnt_access_control_entry_get_flagsβ drops the flags into auint8_t *flags.libfwnt_access_control_entry_get_access_maskβ drops the mask into auint32_t *access_mask. mask on, mask off πlibfwnt_access_control_entry_get_security_identifierβ hands you thelibfwnt_security_identifier_t **security_identifierfor that entry π«Ά
ποΈ LZNT1 functions ποΈ
int
libfwnt_lznt1_decompress(const uint8_t *compressed_data,
size_t compressed_data_size, uint8_t *uncompressed_data,
size_t *uncompressed_data_size, libfwnt_error_t **error);
libfwnt_lznt1_decompressβ in goesconst uint8_t *compressed_datawithsize_t compressed_data_size, out comesuint8_t *uncompressed_datawithsize_t *uncompressed_data_size, plus the error slot. glow-down complete β¨
π LZX functions π
int
libfwnt_lzx_decompress(const uint8_t *compressed_data,
size_t compressed_data_size, uint8_t *uncompressed_data,
size_t *uncompressed_data_size, libfwnt_error_t **error);
libfwnt_lzx_decompressβ same shape: compressed in, uncompressed out, sizes both ways, error slot. it's the LZX one π
π« LZXPRESS functions π«
int
libfwnt_lzxpress_decompress(const uint8_t *compressed_data,
size_t compressed_data_size, uint8_t *uncompressed_data,
size_t *uncompressed_data_size, libfwnt_error_t **error);
int
libfwnt_lzxpress_huffman_decompress(const uint8_t *compressed_data,
size_t compressed_data_size, uint8_t *uncompressed_data,
size_t *uncompressed_data_size, libfwnt_error_t **error);
libfwnt_lzxpress_decompressβ the LZXPRESS classic. compressed in, uncompressed out, sizes, error slot.libfwnt_lzxpress_huffman_decompressβ same signature, but the Huffman one. two icons, one family π
π DESCRIPTION π
so like, real talk: the libfwnt_get_version() function is the one you call to get the library version. that's it, that's the description. she's simple and she's slaying π
π RETURN VALUES π
most of the functions return NULL or -1 on error, whichever one fits the return type (they're not all built the same, bestie). for the actual return values you gotta go read "libfwnt.h", no cap π
π ENVIRONMENT π
None
like literally nothing. the environment said no comment π§
π FILES π
None
nothing here either. iconic of her honestly β¨
π BUGS π
if you find a bug β any kind, we don't discriminate β please report it on the project issue tracker, which lives at:
https://github.com/libyal/libfwnt/issues
tell them everything, bestie π«Ά
βοΈ AUTHOR βοΈ
these man pages are generated from "libfwnt.h". they were born from the header, which is lowkey kind of poetic π
βοΈ COPYRIGHT βοΈ
Copyright (C) 2009-2024, Joachim Metz <joachim.metz@gmail.com>.
this is free software; see the source for copying conditions. there is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE π¨
fr fr read that last bit again. no warranty. none. zero. don't come for her if it breaks π
π SEE ALSO π
- the
libfwnt.hinclude file
and that's the whole page, babe π
cute little sign-off: this page islibfwnt(3), and it's datedDecember 15, 2019π so if you're reading it way later than that, hi, hope you're hydrated π«Ά
go forth and parse some Windows NT formats, you got this πβ¨π¦
π¦ where this page comes from
- debian trixie: libfwnt-dev 20240415-1+b1 Β· LGPL-3.0-or-later
- opensuse-leap 16.0: libfwnt-devel 20240415-bp160.1.12 Β· GFDL-1.3-or-later AND LGPL-3.0-or-later
- opensuse-leap 16.0: libfwnt-devel 20240415-bp160.1.12 Β· GFDL-1.3-or-later AND LGPL-3.0-or-later
- opensuse-leap 16.0: libfwnt-devel 20240415-bp160.1.12 Β· GFDL-1.3-or-later AND LGPL-3.0-or-later
- opensuse-leap 16.0: libfwnt-devel 20240415-bp160.1.12 Β· GFDL-1.3-or-later AND LGPL-3.0-or-later
- ubuntu questing: libfwnt-dev 20240415-1build1
- ubuntu resolute: libfwnt-dev 20240415-1build2 Β· LGPL-3.0-or-later
- ubuntu stonking: libfwnt-dev 20240415-1build2 Β· LGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms