configuration.c File Reference

Mptcpd configuration parser implementation. More...

`#include <stdlib.h>`
`#include <stdio.h>`
`#include <stdbool.h>`
`#include <argp.h>`
`#include <ctype.h>`
`#include <assert.h>`
`#include <sys/types.h>`
`#include <sys/stat.h>`
`#include <unistd.h>`
`#include <ell/log.h>`
`#include <ell/util.h>`
`#include <ell/settings.h>`
`#include <ell/queue.h>`
`#include <ell/string.h>`
`#include <mptcpd/types.h>`
`#include <mptcpd/private/configuration.h>`
Include dependency graph for configuration.c:

## Classes

struct | tok_entry

## Macros

#define | MPTCPD_SET_LOG_FUNCTION MPTCPD_CONCAT(l_log_set_, MPTCPD_LOGGER)
| Name of the default logging function determined at compile-time.
Preprocessor Based String Concatenation
Preprocessor concatenation that expands preprocessor tokens as needed by leveraging the usual indirection technique.
#define | MPTCPD_CONCAT_IMPL(x, ...) x ## __VA_ARGS__
#define | MPTCPD_CONCAT(x, ...) MPTCPD_CONCAT_IMPL(x, __VA_ARGS__)
| Concatenate strings using the preprocessor.
Command Line Option Key Values
Non-ASCII key values for options without a short option (e.g. -d).
#define | MPTCPD_PLUGIN_DIR_KEY 0x100
#define | MPTCPD_PATH_MANAGER_KEY 0x101
| Command line option key for "--path-manager".
#define | MPTCPD_ADDR_FLAGS_KEY 0x102
| Command line option key for "--addr-flags".
#define | MPTCPD_NOTIFY_FLAGS_KEY 0x103
| Command line option key for "--notify-flags".
#define | MPTCPD_LOAD_PLUGINS_KEY 0x104
| Command line option key for "--load-plugins".

## Functions

struct mptcpd_config * | mptcpd_config_create (int argc, char *argv[])
| Create a new mptcpd configuration. More...
void | mptcpd_config_destroy (struct mptcpd_config *config)
| Destroy the mptcpd configuration. More...

## Variables

struct tok_entry const | notify_flags_toks []

## Detailed Description

Mptcpd configuration parser implementation.

Copyright (c) 2017-2021, Intel Corporation

## Macro Definition Documentation

## MPTCPD_CONCAT_IMPL

#define MPTCPD_CONCAT_IMPL | ( |  | x,
|  |  | ...
| ) |  | x ## __VA_ARGS__

Underlying string concatenation macro.

## MPTCPD_PLUGIN_DIR_KEY

#define MPTCPD_PLUGIN_DIR_KEY 0x100

Command line option key for "--plugin-dir".

## Function Documentation

## mptcpd_config_create()

struct mptcpd_config* mptcpd_config_create | ( | int | argc,
|  | char * | argv[]
| ) |  |

Create a new mptcpd configuration.

Parameters

  [in] | argc | Command line argument count.
  [in,out] | argv | Command line argument vector.

Returns
  Mptcpd configuration information.

## mptcpd_config_destroy()

void mptcpd_config_destroy | ( | struct mptcpd_config * | config | ) |

Destroy the mptcpd configuration.

Deallocate all mptcpd configuration resources.

Parameters

  [in,out] | config | Mptcpd configuration to be finalized.

## Variable Documentation

## notify_flags_toks

struct tok_entry const notify_flags_toks[]

Initial value:
= {
{ MPTCPD_NOTIFY_FLAG_EXISTING, "existing" },
{ MPTCPD_NOTIFY_FLAG_SKIP_LL, "skip_link_local" },
{ MPTCPD_NOTIFY_FLAG_SKIP_HOST, "skip_loopback" },
{ MPTCPD_NOTIFY_FLAG_ROUTE_CHECK, "check_route" },
{ 0, NULL },
}
MPTCPD_NOTIFY_FLAG_EXISTING
#define MPTCPD_NOTIFY_FLAG_EXISTING
Notify even the addresses already existing at startup-time.
Definition: types.h:64
MPTCPD_NOTIFY_FLAG_SKIP_HOST
#define MPTCPD_NOTIFY_FLAG_SKIP_HOST
Ignore host (loopback) addresses.
Definition: types.h:70
MPTCPD_NOTIFY_FLAG_SKIP_LL
#define MPTCPD_NOTIFY_FLAG_SKIP_LL
Ignore link-local addresses.
Definition: types.h:67
MPTCPD_NOTIFY_FLAG_ROUTE_CHECK
#define MPTCPD_NOTIFY_FLAG_ROUTE_CHECK
Notify address only if a default route is available from the given interface.
Definition: types.h:73