NetSurf
Data Structures | Typedefs | Functions | Variables
dispatch.c File Reference
#include <limits.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "utils/log.h"
#include "utils/utils.h"
#include "utils/ring.h"
#include "monkey/dispatch.h"
Include dependency graph for dispatch.c:

Go to the source code of this file.

Data Structures

struct  cmdhandler
 

Typedefs

typedef struct cmdhandler monkey_cmdhandler_t
 

Functions

nserror monkey_register_handler (const char *cmd, handle_command_fn fn)
 
void monkey_free_handlers (void)
 
void monkey_process_command (void)
 

Variables

static monkey_cmdhandler_thandler_ring = NULL
 

Typedef Documentation

◆ monkey_cmdhandler_t

Function Documentation

◆ monkey_free_handlers()

void monkey_free_handlers ( void  )

Definition at line 53 of file dispatch.c.

References cmdhandler::cmd, handler_ring, and RING_REMOVE.

Referenced by main().

Here is the caller graph for this function:

◆ monkey_process_command()

void monkey_process_command ( void  )

Definition at line 64 of file dispatch.c.

References buffer, cmdhandler::fn, handler_ring, PATH_MAX, RING_ITERATE_END, RING_ITERATE_START, and RING_ITERATE_STOP.

Referenced by monkey_run().

Here is the caller graph for this function:

◆ monkey_register_handler()

nserror monkey_register_handler ( const char *  cmd,
handle_command_fn  fn 
)

Definition at line 39 of file dispatch.c.

References cmdhandler::cmd, cmdhandler::fn, handler_ring, NSERROR_NOMEM, NSERROR_OK, NSLOG, and RING_INSERT.

Referenced by main().

Here is the caller graph for this function:

Variable Documentation

◆ handler_ring

monkey_cmdhandler_t* handler_ring = NULL
static