mptcpd
Multipath TCP Daemon
Loading...
Searching...
No Matches
configuration.c File Reference

Mptcpd configuration parser implementation. More...

#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <argp.h>
#include <assert.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <ell/ell.h>
#include <mptcpd/types.h>
#include <mptcpd/private/configuration.h>
#include <mptcpd/private/network_monitor.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 logging function determined at compile-time.
#define MPTCPD_KERNEL   "multipath-tcp.org"
Preprocessor Based String Concatenation

Preprocessor concatenation that expands preprocessor tokens as needed by leveraging the usual indirection technique.

#define MPTCPD_CONCAT_IMPL(x, ...)
#define MPTCPD_CONCAT(x, ...)
 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_configmptcpd_config_create (int argc, char *argv[])
 Create a new mptcpd configuration.
void mptcpd_config_destroy (struct mptcpd_config *config)
 Destroy the mptcpd configuration.

Detailed Description

Mptcpd configuration parser implementation.

Copyright (c) 2017-2022, Intel Corporation

Macro Definition Documentation

◆ MPTCPD_CONCAT

#define MPTCPD_CONCAT ( x,
... )
Value:
MPTCPD_CONCAT_IMPL(x, __VA_ARGS__)
#define MPTCPD_CONCAT_IMPL(x,...)
Definition configuration.c:42

Concatenate strings using the preprocessor.

◆ MPTCPD_CONCAT_IMPL

#define MPTCPD_CONCAT_IMPL ( x,
... )
Value:
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]argcCommand line argument count.
[in,out]argvCommand 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]configMptcpd configuration to be finalized.