mtcp_getconf

NAME

mtcp_getconf − retrieve the running configuration of mOS application

SYNOPSIS

#include <mtcp_api.h>

int mtcp_getconf(struct mtcp_conf *conf);

DESCRIPTION

mtcp_getconf() call is used to fetch the current running configuration of the mOS core. The conf argument is a pointer to a user-allocated struct mtcp_conf that contains a number of fields including:

num_cores

An integer that shows the total number of cores the mOS core is using.

max_concurrency

An integer that holds how many ongoing flows each core thread manages concurrently. Default value is 100000.

max_num_buffers

An integer that holds the maximum number of socket buffers each core thread can hold. Default value is 100000.

rcvbuf_size

An integer that holds the size of the TCP receive buffer. Default value is 8KB.

tcp_timeout

An integer that holds the idle flow expiry timeout of the monitoring flow. Default value is 30 secs.

RETURN VALUE

Returns 0 on success; -1 on failure and errno is set appropriately.

ERRORS

EINVAL

The conf argument is NULL.

NOTES

See http://mos.kaist.edu/guide/walkthrough/05_configuration.html to view example startup mOS configuration file.

AUTHORS

mOS development team <mtcp-user@list.ndsl.kaist.edu>

SEE ALSO

mtcp_setconf()

COLOPHON

This page is part of mOS release 0.3 docs section. A description of the project, and information about reporting bugs, can be found at http://mos.kaist.edu/.