Skip to content

Agent KB_src

grisun0 edited this page Oct 23, 2026 · 12 revisions

Subsystem: src (page 1 of 3)

Pages: KB_src.md, KB_src_p2.md, KB_src_p3.md

progs/src/aes.c

  • Doc: command path AES-256-CTR encryption tools: aes and unaes.
  • Layer: utility
  • Language: c
  • Symbols:
    • aes_read_all (function, line 69) static char *aes_read_all(const char *name, int *len)
    • aes_write_all (function, line 86) static int aes_write_all(const char *name, char *data, int len)
    • aes_has (function, line 96) static int aes_has(const char *s, const char *needle)
    • hex_val (function, line 110) static int hex_val(int c)
    • aes_parse_hex (function, line 117) static int aes_parse_hex(const char *s, int want, int *out)
    • aes_gf_mul (function, line 130) static int aes_gf_mul(int a, int b)
    • aes_xtime (function, line 142) static int aes_xtime(int x)
    • aes_rotl8 (function, line 148) static int aes_rotl8(int x, int n)
    • aes_init_tables (function, line 155) static void aes_init_tables(void)
    • aes_key_expand (function, line 174) static void aes_key_expand(const int *key)
    • aes_add_round_key (function, line 209) static void aes_add_round_key(int round)
    • aes_sub_bytes (function, line 215) static void aes_sub_bytes(void)
    • aes_shift_rows (function, line 220) static void aes_shift_rows(void)
    • aes_mix_columns (function, line 228) static void aes_mix_columns(void)
    • aes_cipher (function, line 248) static void aes_cipher(void)
    • aes_iv_increment (function, line 263) static void aes_iv_increment(void)
    • aes_ctr_crypt (function, line 273) static void aes_ctr_crypt(char *data, int len)
    • aes_hdr_put (function, line 288) static void aes_hdr_put(char *h, int size)
    • aes_hdr_get (function, line 299) static int aes_hdr_get(char *h)
    • aes_tool_name (function, line 307) static const char *aes_tool_name(int decode)
    • aes_run (function, line 312) static int aes_run(int decode, const char *keyhex, const char *noncehex, const...
    • main (function, line 384) int main(int argc, char **argv)
    • GF (function, line 8) * generated procedurally from the GF(2^8) multiplicative inverse plus the * FIPS-197 affine transform, so the file...
    • putchar (function, line 25) int putchar();
    • strcmp (function, line 26) int strcmp();
    • strlen (function, line 27) int strlen();
    • fopen (function, line 28) void *fopen();
    • fclose (function, line 29) int fclose();
    • fread (function, line 30) int fread();
    • fwrite (function, line 31) int fwrite();
    • fseek (function, line 32) int fseek();
    • ftell (function, line 33) int ftell();
    • rewind (function, line 34) void rewind();
    • malloc (function, line 35) void *malloc();
    • free (function, line 36) void free();
    • AES_MAGIC0 (macro, line 38) #define AES_MAGIC0
    • AES_MAGIC1 (macro, line 39) #define AES_MAGIC1
    • AES_MAGIC2 (macro, line 40) #define AES_MAGIC2
    • AES_MAGIC3 (macro, line 41) #define AES_MAGIC3
    • AES_HDR_SIZE (macro, line 42) #define AES_HDR_SIZE
    • AES_BLOCK (macro, line 44) #define AES_BLOCK
    • AES_KEY_BYTES (macro, line 45) #define AES_KEY_BYTES
    • AES_NONCE_BYTES (macro, line 46) #define AES_NONCE_BYTES
    • AES_ROUNDS (macro, line 47) #define AES_ROUNDS
    • AES_RK_LEN (macro, line 48) #define AES_RK_LEN
    • AES_SBOX_SIZE (macro, line 49) #define AES_SBOX_SIZE
    • AES_RCON_SIZE (macro, line 50) #define AES_RCON_SIZE
    • AES_POLY (macro, line 52) #define AES_POLY
    • AES_AFFINE_C (macro, line 53) #define AES_AFFINE_C
    • AES_RCON_PAD (macro, line 54) #define AES_RCON_PAD
    • HEX_KEY_LEN (macro, line 56) #define HEX_KEY_LEN
    • HEX_NONCE_LEN (macro, line 57) #define HEX_NONCE_LEN
    • AES_SEEK_END (macro, line 59) #define AES_SEEK_END
    • AES_EXIT_FAIL (macro, line 61) #define AES_EXIT_FAIL

progs/src/apsse.c

  • Doc: SSE in glibc threads on every CPU (docs/spec/smp-sched.md,
  • Layer: utility
  • Language: c
  • Symbols:
    • apsse_job (struct, line 42)
    • apsse_grind (function, line 49) static uint64_t apsse_grind(int id)
    • apsse_worker (function, line 75) static void *apsse_worker(void *arg)
    • main (function, line 81) int main(void)
    • _GNU_SOURCE (macro, line 23) #define _GNU_SOURCE
    • APSSE_THREADS (macro, line 31) #define APSSE_THREADS
    • APSSE_ROUNDS (macro, line 32) #define APSSE_ROUNDS
    • APSSE_SEED (macro, line 33) #define APSSE_SEED
    • APSSE_BUF (macro, line 34) #define APSSE_BUF
    • APSSE_NEEDLE (macro, line 35) #define APSSE_NEEDLE
    • APSSE_MAP_ROUNDS (macro, line 36) #define APSSE_MAP_ROUNDS
    • APSSE_MAP_BYTES (macro, line 37) #define APSSE_MAP_BYTES
    • APSSE_MAP_FILL (macro, line 38) #define APSSE_MAP_FILL
    • APSSE_OK (macro, line 39) #define APSSE_OK
    • APSSE_BAD (macro, line 40) #define APSSE_BAD
  • Depends on: kernel/string.c

progs/src/aslr.c

  • Doc: aslr -- userspace ASLR probe (self-exec chain).
  • Layer: utility
  • Language: c
  • Symbols:
    • as_sc (function, line 10) static long as_sc(long n, long a1, long a2, long a3)
    • as_mmap (function, line 18) static long as_mmap(void)
    • as_write (function, line 31) static void as_write(const char *s, unsigned long len)
    • as_exit (function, line 35) static void as_exit(long code)
    • as_execve (function, line 40) static void as_execve(const char *path, const char **argv)
    • as_putu (function, line 47) static void as_putu(unsigned long v)
    • as_atou (function, line 59) static unsigned long as_atou(const char *s)
    • as_rsp (function, line 68) static unsigned long as_rsp(void)
    • as_fail (function, line 74) static void as_fail(int step)
    • lmain (function, line 82) int lmain(long argc, char **argv)

progs/src/audio.c

  • Layer: utility
  • Language: c
  • Symbols:
    • syscall1 (function, line 3) static long syscall1(long n, long a1)
    • syscall2 (function, line 9) static long syscall2(long n, long a1, long a2)
    • syscall3 (function, line 15) static long syscall3(long n, long a1, long a2, long a3)
    • syscall0 (function, line 21) static long syscall0(long n)
    • audio_init (function, line 27) int audio_init(void)
    • audio_tone (function, line 31) void audio_tone(unsigned freq)
    • audio_pcm_open (function, line 35) int audio_pcm_open(unsigned rate, unsigned channels, unsigned format)
    • audio_pcm_submit (function, line 40) int audio_pcm_submit(const void *buf, unsigned len)
    • audio_pcm_pump (function, line 44) void audio_pcm_pump(void)
    • audio_pcm_close (function, line 48) void audio_pcm_close(void)
    • audio_set_volume (function, line 52) void audio_set_volume(unsigned volume)
    • audio_get_volume (function, line 56) unsigned audio_get_volume(void)
    • audio_sb16_present (function, line 60) int audio_sb16_present(void)
    • audio_stream_open (function, line 64) int audio_stream_open(void)
    • audio_stream_close (function, line 68) void audio_stream_close(int id)
    • audio_stream_submit (function, line 72) int audio_stream_submit(int id, const void *buf, unsigned len)
    • audio_stream_volume (function, line 76) void audio_stream_volume(int id, unsigned char vol)
  • Depends on: progs/minios_abi.h

progs/src/burn.c

  • Doc: burn -- SMP mixed-workload probe: brk plus mmap plus CPU burn with
  • Layer: utility
  • Language: c
  • Symbols:
    • bn_sc (function, line 6) static long bn_sc(long n, long a1, long a2, long a3)
    • bn_mmap (function, line 14) static long bn_mmap(unsigned long len)
    • bn_write (function, line 27) static void bn_write(const char *s, unsigned long len)
    • bn_exit (function, line 31) static void bn_exit(long code)
    • bn_putu (function, line 36) static void bn_putu(unsigned long v)
    • bn_fail (function, line 48) static void bn_fail(void)
    • lmain (function, line 53) int lmain(void)

progs/src/cp.c

  • Layer: utility
  • Language: c
  • Symbols:
    • main (function, line 10) int main(int argc, char **argv)
    • printf (function, line 1) int printf();
    • fopen (function, line 2) void *fopen();
    • fclose (function, line 3) int fclose();
    • fread (function, line 4) int fread();
    • fwrite (function, line 5) int fwrite();
    • CP_BUF_SIZE (macro, line 7) #define CP_BUF_SIZE
    • CP_EXIT_FAIL (macro, line 8) #define CP_EXIT_FAIL

progs/src/cpl.c

  • Doc: Ring-3 privilege probe.
  • Layer: utility
  • Language: c
  • Symbols:
    • read_cpl (function, line 6) static long read_cpl(void)
    • exit_now (function, line 12) static void exit_now(long code)
    • _start (function, line 16) void _start(void)

progs/src/cvmfmt.c

  • Doc: CVM formatting probe.
  • Layer: utility
  • Language: c
  • Symbols:
    • main (function, line 19) int main(void)
  • Depends on: kernel/string.c

progs/src/execho.c

  • Doc: execho -- fork(57) + execve(59) + wait4(61) probe.
  • Layer: utility
  • Language: c
  • Symbols:
    • path (function, line 7) `* execs a ghost path (must fail -2, exits 42). The parent checks
  • both wait4 results with Linux...`
  • ex_write (function, line 20) static void ex_write(const char *s, unsigned long len)
  • ex_exit (function, line 24) static void ex_exit(long code)
  • ex_fail (function, line 29) static void ex_fail(int step)
  • lmain (function, line 37) int lmain(void)
  • program (function, line 5) * * Proves the UNIX process composition the kernel lacked: a child * produced by fork replaces its image with execve...

progs/src/execthr.c

  • Doc: execthr -- execve kills sibling threads (Linux semantics).
  • Layer: utility
  • Language: c
  • Symbols:
    • et_sc (function, line 11) static long et_sc(long n, long a1, long a2, long a3)
    • et_exit (function, line 19) static void et_exit(long code)
    • et_thread (function, line 27) static void et_thread(void)
    • lmain (function, line 33) int lmain(void)

progs/src/fib.c

  • Layer: utility
  • Language: c
  • Symbols:
    • fib (function, line 1) int fib(int n)
    • main (function, line 6) int main(void)

progs/src/forktest.c

  • Layer: utility
  • Language: c
  • Symbols:
    • fx_syscall6 (function, line 17) static long fx_syscall6(long n, long a1, long a2, long a3, long a4, long a5, long a6)
    • fx_strlen (function, line 41) static unsigned long fx_strlen(const char *s)
    • fx_write (function, line 47) static void fx_write(const char *s)
    • fx_exit (function, line 51) static void fx_exit(long code)
    • _start (function, line 56) void _start(void)
    • this (function, line 115) * this (and the child's closes must survive below). */ fx_syscall6(SYS_close, pfd[1], 0, 0, 0, 0, 0);
    • SYS_read (macro, line 30) #define SYS_read
    • SYS_write (macro, line 31) #define SYS_write
    • SYS_close (macro, line 32) #define SYS_close
    • SYS_pipe (macro, line 33) #define SYS_pipe
    • SYS_yield (macro, line 34) #define SYS_yield
    • SYS_fork (macro, line 35) #define SYS_fork
    • SYS_exit (macro, line 36) #define SYS_exit
    • SYS_wait4 (macro, line 37) #define SYS_wait4

progs/src/fptest.c

  • Doc: FPU/SSE context-switch probe (Phase 0.1, ADR-0014).
  • Layer: utility
  • Language: c
  • Symbols:
    • fp_slot_t (struct, line 56)
    • read_mxcsr (function, line 42) static unsigned int read_mxcsr(void)
    • raw_gettid (function, line 48) static long raw_gettid(void)
    • raw_getrandom (function, line 52) static long raw_getrandom(void *buf, unsigned long n)
    • stack_align_canary (function, line 78) static void stack_align_canary(void)
    • worker (function, line 84) static void *worker(void *p)
    • main (function, line 148) int main(void)
    • gettid (function, line 21) * * The same run smokes gettid (Phase 0.4: the two workers must observe * distinct tids, never the constant 1) and...
    • FP_ITERS (macro, line 38) #define FP_ITERS
  • Depends on: progs/minios_abi.h, progs/src/mthreads.h

progs/src/freedom.c

  • Doc: freedom - a headless text browser for MiniOS.
  • Layer: utility
  • Language: c
  • Symbols:
    • tls_close (function, line 58) static int tls_close(int fd)
    • atoi (function, line 151) static int atoi(char *s)
    • append (function, line 166) static int append(char *dst, int pos, char *src, int cap)
    • ci_lower (function, line 176) static int ci_lower(int c)
    • ci_starts (function, line 182) static int ci_starts(char *s, char *pre)
    • ci_eq (function, line 193) static int ci_eq(char *a, char *b)
    • ci_index (function, line 203) static int ci_index(char *s, char *needle)
    • looks_like_url (function, line 212) static int looks_like_url(char *s)
    • has_scheme (function, line 226) static int has_scheme(char *s)
    • make_search (function, line 242) static void make_search(char *out, char *query, int cap)
    • split_url (function, line 266) static int split_url(char *url)
    • resolve_redirect (function, line 313) static int resolve_redirect(void)
    • put_ws (function, line 366) static void put_ws(void)
    • put_utf (function, line 377) static void put_utf(int c)
    • put_text (function, line 427) static void put_text(int c)
    • css_append (function, line 483) static void css_append(char *s, int n)
    • css_line (function, line 489) static void css_line(char *s)
    • dom_append (function, line 494) static void dom_append(char *s, int n)
    • dom_space (function, line 500) static void dom_space(void)
    • dom_nl (function, line 504) static void dom_nl(void)
    • record_attr (function, line 509) static void record_attr(void)
    • is_void_tag (function, line 534) static int is_void_tag(void)
    • classify_tag (function, line 546) static void classify_tag(void)
    • body_byte (function, line 631) static void body_byte(int c)
    • head_line (function, line 796) static void head_line(char *line)
    • parse_head (function, line 821) static void parse_head(void)
    • recv_body (function, line 843) static int recv_body(int fd, char *buf, int len)
    • send_all (function, line 849) static int send_all(int fd, char *buf, int len)
    • fetch (function, line 860) static int fetch(char *host, char *path, int port)
    • fetch_css (function, line 1031) static void fetch_css(char *host, char *path)
    • print_css_dump (function, line 1113) static void print_css_dump(void)
    • print_dom_dump (function, line 1122) static void print_dom_dump(void)
    • main (function, line 1129) int main(int argc, char **argv)
    • curlfree (function, line 4) * spirit of curlfree (http.c + htmlfilter.c): a bounded header phase, * Content-Length or EOF body reading...
    • net_dns_resolve (function, line 41) int net_dns_resolve(const char *host);
    • tls_handshake (function, line 42) int tls_handshake(int fd, char *host);
    • tls_send (function, line 43) int tls_send(int fd, char *buf, int len);
    • tls_recv (function, line 44) int tls_recv(int fd, char *buf, int len);
    • socket (function, line 52) int socket(int domain, int type, int proto);
    • connect (function, line 53) int connect(int fd, void *addr, int addrlen);
    • sendto (function, line 54) int sendto(int fd, char *buf, int len, int flags, void *to, int tolen);
    • recvfrom (function, line 55) int recvfrom(int fd, char *buf, int len, int flags, void *from, int *fromlen);
    • close (function, line 56) int close(int fd);
    • printf (function, line 63) int printf(char *fmt, ...);
    • puts (function, line 64) int puts(char *s);
    • strlen (function, line 65) int strlen(char *s);
    • strchr (function, line 66) char *strchr(char *s, int c);
    • strcmp (function, line 67) int strcmp(char *a, char *b);
    • strncmp (function, line 68) int strncmp(char *a, char *b, int n);
    • memcpy (function, line 69) int memcpy(char *dst, char *src, int n);
    • memset (function, line 70) int memset(char *dst, int c, int n);
    • putchar (function, line 71) int putchar(int c);
    • FREEDOM_HOPS_MAX (macro, line 74) #define FREEDOM_HOPS_MAX
    • FREEDOM_HDR_MAX (macro, line 75) #define FREEDOM_HDR_MAX
    • FREEDOM_BUF (macro, line 76) #define FREEDOM_BUF
    • FREEDOM_CHUNK_MAX (macro, line 77) #define FREEDOM_CHUNK_MAX
    • FREEDOM_CSS_MAX (macro, line 78) #define FREEDOM_CSS_MAX
    • FREEDOM_CSS_BUF (macro, line 79) #define FREEDOM_CSS_BUF
    • FREEDOM_DOM_BUF (macro, line 80) #define FREEDOM_DOM_BUF
    • FREEDOM_ATTR_MAX (macro, line 81) #define FREEDOM_ATTR_MAX
    • FREEDOM_LINE_MAX (macro, line 82) #define FREEDOM_LINE_MAX
  • Depends on: kernel/string.c

progs/src/freedom_wl.c

  • Doc: freedom_wl - Wayland to MiniOS intermediate layer for FreeDom.
  • Layer: utility
  • Language: c
  • Symbols:
    • FreedomWlConfig (struct, line 76)
    • present_buf (type_alias, line 76) typedef struct FreedomWlConfig { long present_buf;
    • freedom_wl_surface_id (function, line 114) static long freedom_wl_surface_id(void)
    • freedom_wl_surface_attach (function, line 129) static long freedom_wl_surface_attach(FreedomWlConfig *c)
    • freedom_wl_default (function, line 158) static FreedomWlConfig freedom_wl_default(void)
    • freedom_wl_clip_rect (function, line 196) static long freedom_wl_clip_rect(FreedomWlConfig *c, long *x, long *y, long *w, long *h)
    • freedom_wl_frame_bytes (function, line 227) static long freedom_wl_frame_bytes(FreedomWlConfig *c, long w, long h)
    • freedom_wl_keysym (function, line 246) static long freedom_wl_keysym(FreedomWlConfig *c, long sc)
    • freedom_wl_sanitize_utf8 (function, line 286) static long freedom_wl_sanitize_utf8(char *s, long cap)
    • freedom_wl_title_ok (function, line 359) static long freedom_wl_title_ok(FreedomWlConfig *c, char *t, long n)
    • wl_copy (function, line 370) static long wl_copy(char *dst, char *src, long cap)
    • wl_strlen (function, line 388) static long wl_strlen(char *s, long cap)
    • wl_append (function, line 404) static long wl_append(char *dst, long pos, char *src, long cap)
    • wl_ci_lower (function, line 427) static long wl_ci_lower(long ch)
    • wl_ci_starts (function, line 435) static long wl_ci_starts(char *s, char *pre)
    • wl_ci_contains (function, line 453) static long wl_ci_contains(char *s, char *needle)
    • wl_has_scheme (function, line 467) static long wl_has_scheme(char *s)
    • wl_looks_like_url (function, line 493) static long wl_looks_like_url(char *s)
    • wl_make_search (function, line 512) static long wl_make_search(char *out, char *query, long cap)
    • wl_split_url (function, line 544) static long wl_split_url(FreedomWlConfig *c, char *url, char *host, char *path, long *port, long ...
    • wl_resolve_redirect (function, line 609) static long wl_resolve_redirect(FreedomWlConfig *c, char *loc, long secure, char *host, char *pat...
    • wl_scroll_clamp (function, line 689) static long wl_scroll_clamp(FreedomWlConfig *c, long off, long nlines)
    • wl_filter_wrap (function, line 708) static long wl_filter_wrap(FreedomWlConfig *c, char *body, long n, char *lines, long maxlines, lo...
    • wl_status_text (function, line 951) static long wl_status_text(FreedomWlConfig *c, char *host, long nbytes, long off, long nlines, ch...
    • freedom_wl_build_palette (function, line 1039) static long freedom_wl_build_palette(unsigned char *pal, long cap)
    • freedom_wl_sys_present (function, line 1062) static long freedom_wl_sys_present(long buf, long origin)
    • freedom_wl_sys_title (function, line 1069) static long freedom_wl_sys_title(char *t)
    • freedom_wl_sys_palette (function, line 1076) static long freedom_wl_sys_palette(unsigned char *pal)
    • freedom_wl_sys_mouse (function, line 1083) static long freedom_wl_sys_mouse(long *m)
    • freedom_wl_sys_kbd (function, line 1090) static long freedom_wl_sys_kbd(void)
    • freedom_wl_sys_vga_mode (function, line 1097) static long freedom_wl_sys_vga_mode(long on)
    • freedom_wl_sys_kbd_raw (function, line 1104) static long freedom_wl_sys_kbd_raw(long on)
    • freedom_wl_sys_yield (function, line 1111) static long freedom_wl_sys_yield(void)
    • wl_parse_headers (function, line 1118) static long wl_parse_headers(FreedomWlConfig *c, char *hdr, long *status, long *clen, long *hascl...
    • wl_fetch_raw (function, line 1210) static long wl_fetch_raw(FreedomWlConfig *c, char *host, char *path, long port, long secure)
    • wl_render (function, line 1445) static long wl_render(FreedomWlConfig *c, long off)
    • wl_browse (function, line 1532) static long wl_browse(FreedomWlConfig *c)
    • freedom_wl_selftest (function, line 1613) static long freedom_wl_selftest(void)
    • freedom_wl_host_probe (function, line 1696) int freedom_wl_host_probe(FreedomWlConfig *c)
    • main (function, line 1731) int main(int argc, char **argv)
    • net_dns_resolve (function, line 42) int net_dns_resolve(const char *host);
    • tls_handshake (function, line 43) int tls_handshake(int fd, char *host);
    • tls_send (function, line 44) int tls_send(int fd, char *buf, int len);
    • tls_recv (function, line 45) int tls_recv(int fd, char *buf, int len);
    • tls_close (function, line 46) void tls_close(int fd);
    • WL_COLS (macro, line 49) #define WL_COLS
    • WL_ROWS (macro, line 50) #define WL_ROWS
    • WL_TEXT_ROWS (macro, line 51) #define WL_TEXT_ROWS
    • WL_LINES_MAX (macro, line 52) #define WL_LINES_MAX
    • WL_LINE_LEN (macro, line 53) #define WL_LINE_LEN
    • WL_BODY_CAP (macro, line 54) #define WL_BODY_CAP
    • WL_HDR_MAX (macro, line 55) #define WL_HDR_MAX
    • WL_NET_BUF (macro, line 56) #define WL_NET_BUF
    • WL_REQ_MAX (macro, line 57) #define WL_REQ_MAX
    • WL_HOST_MAX (macro, line 58) #define WL_HOST_MAX
    • WL_PATH_MAX (macro, line 59) #define WL_PATH_MAX
    • WL_URL_MAX (macro, line 60) #define WL_URL_MAX
    • WL_HOPS_MAX (macro, line 61) #define WL_HOPS_MAX
    • WL_FONT_W (macro, line 62) #define WL_FONT_W
    • WL_FONT_H (macro, line 63) #define WL_FONT_H
    • WL_TAG_MAX (macro, line 64) #define WL_TAG_MAX
    • WL_ENT_MAX (macro, line 65) #define WL_ENT_MAX
  • Depends on: headers/vga_fb.h, kernel/string.c, progs/minios_abi.h, progs/nk_palette.h, progs/wl/wl_mini.h
  • Imported by: tests/test_freedom_wl.c

progs/src/ftest.c

  • Doc: Exercises the kernel libc surface used by loaded .o programs:
  • Layer: utility
  • Language: c
  • Symbols:
    • main (function, line 13) int main(int argc, char **argv)
    • fprintf (function, line 4) extern int fprintf(void *stream, const char *fmt, ...);
    • snprintf (function, line 5) extern int snprintf(char *buf, unsigned long size, const char *fmt, ...);
    • printf (function, line 6) extern int printf(const char *fmt, ...);
    • exit (function, line 7) extern void exit(int code);
    • fopen (function, line 11) extern void *fopen(const char *path, const char *mode);
    • stdout (variable, line 8) extern void *stdout;
    • stderr (variable, line 9) extern void *stderr;
    • errno (variable, line 10) extern int errno;

progs/src/hello.c

  • Doc: MiniOS test program — compiled as relocatable .o, loaded by kernel ELF loader
  • Layer: utility
  • Language: c
  • Symbols:
    • main (function, line 4) int main(int argc, char **argv)
    • printf (function, line 2) extern int printf(const char *fmt, ...);

progs/src/hello.py

  • Layer: utility
  • Language: py

progs/src/http.c

  • Doc: Minimal HTTP/1.0 GET through the Linux socket syscalls.
  • Layer: presentation
  • Language: c
  • Symbols:
    • atoi (function, line 18) int atoi(char *s)
    • main (function, line 29) int main(int argc, char **argv)
    • kernel (function, line 3) * Hostnames are resolved by the kernel (net_dns_resolve syscall). */ int socket(int domain, int type, int proto);
    • connect (function, line 6) int connect(int fd, void *addr, int addrlen);
    • sendto (function, line 7) int sendto(int fd, char *buf, int len, int flags, void *to, int tolen);
    • recvfrom (function, line 8) int recvfrom(int fd, char *buf, int len, int flags, void *from, int *fromlen);
    • shutdown (function, line 9) int shutdown(int fd, int how);
    • close (function, line 10) int close(int fd);
    • net_dns_resolve (function, line 11) int net_dns_resolve(const char *host);
    • puts (function, line 12) int puts(char *s);
    • printf (function, line 13) int printf(char *fmt, ...);
    • strlen (function, line 14) int strlen(char *s);
    • putchar (function, line 15) int putchar(int c);

progs/src/json.c

  • Doc: command path JSON tool: validate, pretty-print and query.
  • Layer: utility
  • Language: c
  • Symbols:
    • js_read_all (function, line 58) static char *js_read_all(const char *name, int *len)
    • js_new (function, line 76) static int js_new(void)
    • js_skip_ws (function, line 81) static void js_skip_ws(void)
    • js_peek (function, line 89) static int js_peek(void)
    • js_parse_string (function, line 97) static int js_parse_string(void)
    • js_parse_number (function, line 133) static int js_parse_number(void)
    • js_key_match (function, line 143) static int js_key_match(int child, const char *key)
    • js_parse_object (function, line 147) static int js_parse_object(void)
    • js_parse_array (function, line 182) static int js_parse_array(void)
    • js_parse_value (function, line 211) static int js_parse_value(void)
    • js_indent (function, line 281) static void js_indent(int n)
    • js_print_str (function, line 286) static void js_print_str(const char *s)
    • js_print_value (function, line 303) static void js_print_value(int node, int depth)
    • js_find_member (function, line 347) static int js_find_member(int obj, const char *key)
    • js_array_at (function, line 357) static int js_array_at(int arr, int idx)
    • js_query (function, line 369) static int js_query(int root, const char *path)
    • main (function, line 401) int main(int argc, char **argv)
    • js_str (function, line 5) * members keep their key in js_str (the member value node) and their value * in the node itself, and object members...
    • free (function, line 14) void free();
    • printf (function, line 15) int printf();
    • putchar (function, line 16) int putchar();
    • puts (function, line 17) int puts();
    • strlen (function, line 18) int strlen();
    • strcmp (function, line 19) int strcmp();
    • fopen (function, line 20) void *fopen();
    • fclose (function, line 21) int fclose();
    • fread (function, line 22) int fread();
    • fseek (function, line 23) int fseek();
    • ftell (function, line 24) int ftell();
    • rewind (function, line 25) void rewind();
    • JS_MAX_NODES (macro, line 27) #define JS_MAX_NODES
    • JS_POOL (macro, line 28) #define JS_POOL
    • JS_NULL (macro, line 30) #define JS_NULL
    • JS_BOOL (macro, line 31) #define JS_BOOL
    • JS_NUM (macro, line 32) #define JS_NUM
    • JS_STR (macro, line 33) #define JS_STR
    • JS_OBJ (macro, line 34) #define JS_OBJ
    • JS_ARR (macro, line 35) #define JS_ARR
    • JS_SEEK_END (macro, line 37) #define JS_SEEK_END
    • JS_EXIT_OK (macro, line 38) #define JS_EXIT_OK
    • JS_EXIT_FAIL (macro, line 39) #define JS_EXIT_FAIL

progs/src/kmem.c

  • Doc: Kernel-pointer rejection probe.
  • Layer: utility
  • Language: c
  • Symbols:
    • syscall3 (function, line 7) static long syscall3(long n, long a1, long a2, long a3)
    • exit_now (function, line 14) static void exit_now(long code)
    • _start (function, line 18) void _start(void)

progs/src/ldhello.c

  • Layer: utility
  • Language: c
  • Symbols:
    • main (function, line 1) int main(void)

Next: KB_src_p2.md

Start

Wiki

Agent Docs

Recipes

Clone this wiki locally