Entry point
main() and netotter(): the startup sequence, the CLI and interactive loops, the exit cleanup.
Generated by make docs from the source and GCC's call graph. Back to the Function explorer.
src/entry_point/main.c
Passes the arguments to netotter() and returns its exit code
main
int main(int ac, char **av)
src/entry_point/main.c:9 · non-static · both builds
Called by: nothing (entry point)
Calls: netotter
src/entry_point/netotter.c
netotter(): the startup sequence, the CLI and interactive loops, and the cleanup at exit
netotter_new
netotter_t *netotter_new(void)
src/entry_point/netotter.c:26 · non-static · both builds
Called by: netotter
Calls: init_parser_t, hostmap_new, anomalies_init
Library and system calls: malloc, memset
netotter_delete
void netotter_delete(netotter_t *netotter)
src/entry_point/netotter.c:56 · non-static · both builds
Called by: netotter
Calls: filter_args_free, filters_clear, local_addrs_free, hostmap_free, renames_free, reverse_free, anomalies_free, plist_destroy, store_free, queue_purge, my_out_free
Library and system calls: close, free
enable_from_list
static int enable_from_list(lib_common_t *os_lib, char *if_list)
src/entry_point/netotter.c:80 · static · both builds
Enables every interface of the comma-separated id list (-i). 0 on success, 1 on the first id that can't be enabled.
Called by: netotter
Calls: my_putstr, my_strtok, tab_free, str_to_id, toggle_ifname, get_ifname_state, toggle_ifname, get_ifname_state
on_sigint
static void on_sigint(int sig)
src/entry_point/netotter.c:109 · static · both builds
Called by: nothing
run_cli
static void run_cli(lib_common_t *os_lib, netotter_t *netotter)
src/entry_point/netotter.c:118 · static · both builds
CLI mode: ticks on the interfaces given by -i until Ctrl-C, then prints the packet list. Without -i (only -I), there is nothing to capture: the loaded packets are printed (and saved with -O) right away.
Called by: start_program
Calls: raw_to_f, local_refresh, anomaly_tick, anomaly_report, anomaly_stats, capture_full_check, display_packets, my_putstr, my_write, tick, my_usleep, tick, my_usleep
run_interactive
static void run_interactive(lib_common_t *os_lib, netotter_t *netotter)
src/entry_point/netotter.c:143 · static · both builds
Interactive mode: ticks every TICK_US like the CLI mode, while waiting on stdin for interface ids and commands. q, end of stdin or Ctrl-C exits.
Called by: start_program
Calls: print_commands, handle_key, raw_to_f, display_enabled_itrf, local_refresh, reverse_tick, anomaly_tick, capture_full_check, if_tab_display, my_putstr, tick, stdin_wait, tick, stdin_wait
Library and system calls: _errno
start_program
void start_program(netotter_t *netotter, lib_common_t *os_lib, int *ret)
src/entry_point/netotter.c:171 · non-static · both builds
Called by: netotter
Calls: run_cli, run_interactive, filters_print, anomaly_load_summary, save_packets, my_write
Library and system calls: fflush, signal
netotter
int netotter(char **av)
src/entry_point/netotter.c:195 · non-static · both builds
Called by: main
Calls: netotter_new, netotter_delete, enable_from_list, start_program, parse_args, filters_apply_args, local_refresh, reverse_log_print, reverse_cache_load, load_packets, store_init, if_tab_display, my_putstr, init_common_struct, common_lib_terminate, init_common_struct, common_lib_terminate
User guide
- Overview
- Installation
- Getting started
- Command-line options
- Interactive commands
- Display filters
- Analysis view
- Reverse DNS and privacy
- Anomaly detection
- Save files
- Memory and limits
- Troubleshooting
Developer documentation
- Overview
- Building
- Architecture
- OS backends
- Packet parsing
- Packet storage
- Save format
- Hostname learning
- Reverse DNS internals
- Filters and analysis internals
- Anomaly lab
- Coding conventions
- Function explorer
Learning