nmc-utils  0.1.1
nmctl.c File Reference
#include <stdio.h>
#include <getopt.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <sys/epoll.h>
#include <easynmc.h>
Include dependency graph for nmctl.c:

Go to the source code of this file.

Macros

#define dbg(fmt,...)
#define err(fmt,...)
#define NUMEVENTS   16

Functions

int do_dump_core_info (struct easynmc_handle *h, void *udata)
int do_boot_core (struct easynmc_handle *h, void *optarg)
int do_dump_ldr_info (struct easynmc_handle *h, void *optarg)
int do_reset_stats (struct easynmc_handle *h, void *optarg)
int do_load_abs (struct easynmc_handle *h, void *arg)
int do_start_app (struct easynmc_handle *h, void *optarg)
int do_irq (struct easynmc_handle *h, void *optarg)
int do_mon (struct easynmc_handle *h, void *optarg)
int do_kill (struct easynmc_handle *h, void *optarg)
int do_mon_epoll (struct easynmc_handle *h, void *optarg)
void usage (char *nm)
int main (int argc, char **argv)

Variables

int g_debug = 1
int g_force = 0
int g_nostdio = 0

Macro Definition Documentation

#define dbg (   fmt,
  ... 
)
Value:
if (g_debug) { \
fprintf(stderr, "nmctl: " fmt, ##__VA_ARGS__); \
}

Definition at line 38 of file nmctl.c.

#define err (   fmt,
  ... 
)
Value:
if (g_debug) { \
fprintf(stderr, "nmctl: " fmt, ##__VA_ARGS__); \
}

Definition at line 42 of file nmctl.c.

#define NUMEVENTS   16

Definition at line 250 of file nmctl.c.

Referenced by do_mon_epoll().

Function Documentation

int do_boot_core ( struct easynmc_handle h,
void *  optarg 
)

Definition at line 106 of file nmctl.c.

References easynmc_boot_core(), and easynmc_handle::id.

Referenced by main().

int do_dump_core_info ( struct easynmc_handle h,
void *  udata 
)
int do_dump_ldr_info ( struct easynmc_handle h,
void *  optarg 
)
int do_irq ( struct easynmc_handle h,
void *  optarg 
)

Definition at line 190 of file nmctl.c.

References easynmc_close(), and easynmc_send_irq().

Referenced by main().

int do_kill ( struct easynmc_handle h,
void *  optarg 
)
int do_load_abs ( struct easynmc_handle h,
void *  arg 
)
int do_mon ( struct easynmc_handle h,
void *  optarg 
)

Definition at line 209 of file nmctl.c.

References easynmc_evt_name(), easynmc_token_new(), easynmc_token_wait(), and easynmc_token::tok.

Referenced by main().

int do_mon_epoll ( struct easynmc_handle h,
void *  optarg 
)

Definition at line 251 of file nmctl.c.

References easynmc_pollmark(), easynmc_handle::id, easynmc_handle::memfd, and NUMEVENTS.

int do_reset_stats ( struct easynmc_handle h,
void *  optarg 
)

Definition at line 135 of file nmctl.c.

References easynmc_reset_stats().

Referenced by main().

int do_start_app ( struct easynmc_handle h,
void *  optarg 
)

Definition at line 174 of file nmctl.c.

References easynmc_close(), EASYNMC_PERSIST_ENABLE, easynmc_persist_set(), and easynmc_start_app().

Referenced by main().

int main ( int  argc,
char **  argv 
)
void usage ( char *  nm)

Definition at line 330 of file nmctl.c.

Referenced by main().

Variable Documentation

int g_debug = 1

Definition at line 33 of file nmctl.c.

int g_force = 0

Definition at line 34 of file nmctl.c.

Referenced by do_kill(), and do_load_abs().

int g_nostdio = 0

Definition at line 35 of file nmctl.c.

Referenced by do_load_abs(), and main().