mtcp_setconf 3 2017-02-02 "Linux" "mOS Library Functions Manual"
NAME
mtcp_setconf - Update mOS-related configuration for mOS app initialization
SYNOPSIS
#include <mtcp_api.h> "int mtcp_setconf(const struct mtcp_conf *" "conf" );
DESCRIPTION
mtcp_setconf () call is used to update the configuration of the mOS core. The "conf" argument is a pointer to a user-defined "struct mtcp_conf" that contains a number of fields including:

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

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

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

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

20 "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

10 "EINVAL" The "conf" argument is NULL. """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""".
"""".SH CONFORMING TO
""""POSIX.1-2001.
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

NOTES
This function is useful when the user wants to override the mOS configuration. For example, the user can first call mtcp_getconf() function, and change the parameters of "struct mtcp_conf" and then call this function to override the configuration. Please note that this function should be called before you call mtcp_create_context() which creates mOS context and launches the mOS threads. See "http://mos.kaist.edu/guide/walkthrough/05_configuration.html" to view example startup mOS configuration file. """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
AUTHORS
mOS development team <[email protected]> """""""""""""""""""""""""""""""""""""""""""""""""""""
SEE ALSO
mtcp_getconf () """""""""""""""""""""""""""""""""""""""""""""""""""""
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/. """""""""""""""""""""""""""""""""""""""""""""""""""""