1<!-- Creator : groff version 1.22.2 --> 2<!-- CreationDate: Wed Feb 22 20:27:37 2017 --> 3<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 4"http://www.w3.org/TR/html4/loose.dtd"> 5<html> 6<head> 7<meta name="generator" content="groff -Thtml, see www.gnu.org"> 8<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> 9<meta name="Content-Style" content="text/css"> 10<style type="text/css"> 11 p { margin-top: 0; margin-bottom: 0; vertical-align: top } 12 pre { margin-top: 0; margin-bottom: 0; vertical-align: top } 13 table { margin-top: 0; margin-bottom: 0; vertical-align: top } 14 h1 { text-align: center } 15</style> 16<title>mtcp_getconf</title> 17 18</head> 19<body> 20 21<h1 align="center">mtcp_getconf</h1> 22 23<a href="#NAME">NAME</a><br> 24<a href="#SYNOPSIS">SYNOPSIS</a><br> 25<a href="#DESCRIPTION">DESCRIPTION</a><br> 26<a href="#RETURN VALUE">RETURN VALUE</a><br> 27<a href="#ERRORS">ERRORS</a><br> 28<a href="#NOTES">NOTES</a><br> 29<a href="#AUTHORS">AUTHORS</a><br> 30<a href="#SEE ALSO">SEE ALSO</a><br> 31<a href="#COLOPHON">COLOPHON</a><br> 32 33<hr> 34 35 36<h2>NAME 37<a name="NAME"></a> 38</h2> 39 40 41<p style="margin-left:11%; margin-top: 1em">mtcp_getconf 42− retrieve the running configuration of mOS 43application</p> 44 45<h2>SYNOPSIS 46<a name="SYNOPSIS"></a> 47</h2> 48 49 50<p style="margin-left:11%; margin-top: 1em"><b>#include 51<mtcp_api.h></b></p> 52 53<p style="margin-left:11%; margin-top: 1em"><b>int 54mtcp_getconf(struct mtcp_conf *</b><i>conf</i><b>);</b></p> 55 56<h2>DESCRIPTION 57<a name="DESCRIPTION"></a> 58</h2> 59 60 61 62<p style="margin-left:11%; margin-top: 1em"><b>mtcp_getconf</b>() 63call is used to fetch the current running configuration of 64the mOS core. The <i>conf</i> argument is a pointer to a 65user-allocated <i>struct mtcp_conf</i> that contains a 66number of fields including:</p> 67 68<table width="100%" border="0" rules="none" frame="void" 69 cellspacing="0" cellpadding="0"> 70<tr valign="top" align="left"> 71<td width="11%"></td> 72<td width="23%"> 73 74 75<p><i>num_cores</i></p></td> 76<td width="8%"></td> 77<td width="58%"> 78 79 80<p>An integer that shows the total number of cores the mOS 81core is using.</p></td></tr> 82<tr valign="top" align="left"> 83<td width="11%"></td> 84<td width="23%"> 85 86 87<p><i>max_concurrency</i></p></td> 88<td width="8%"></td> 89<td width="58%"> 90 91 92<p>An integer that holds how many ongoing flows each core 93thread manages concurrently. Default value is 100000.</p></td></tr> 94<tr valign="top" align="left"> 95<td width="11%"></td> 96<td width="23%"> 97 98 99<p><i>max_num_buffers</i></p></td> 100<td width="8%"></td> 101<td width="58%"> 102 103 104<p>An integer that holds the maximum number of socket 105buffers each core thread can hold. Default value is 106100000.</p> </td></tr> 107<tr valign="top" align="left"> 108<td width="11%"></td> 109<td width="23%"> 110 111 112<p><i>rcvbuf_size</i></p></td> 113<td width="8%"></td> 114<td width="58%"> 115 116 117<p>An integer that holds the size of the TCP receive 118buffer. Default value is 8KB.</p></td></tr> 119<tr valign="top" align="left"> 120<td width="11%"></td> 121<td width="23%"> 122 123 124<p><i>tcp_timeout</i></p></td> 125<td width="8%"></td> 126<td width="58%"> 127 128 129<p>An integer that holds the idle flow expiry timeout of 130the monitoring flow. Default value is 30 secs.</p></td></tr> 131</table> 132 133<h2>RETURN VALUE 134<a name="RETURN VALUE"></a> 135</h2> 136 137 138<p style="margin-left:11%; margin-top: 1em">Returns 0 on 139success; -1 on failure and <i>errno</i> is set 140appropriately.</p> 141 142<h2>ERRORS 143<a name="ERRORS"></a> 144</h2> 145 146 147<table width="100%" border="0" rules="none" frame="void" 148 cellspacing="0" cellpadding="0"> 149<tr valign="top" align="left"> 150<td width="11%"></td> 151<td width="9%"> 152 153 154<p style="margin-top: 1em"><b>EINVAL</b></p></td> 155<td width="6%"></td> 156<td width="40%"> 157 158 159<p style="margin-top: 1em">The <i>conf</i> argument is 160NULL.</p> </td> 161<td width="34%"> 162</td></tr> 163</table> 164 165<h2>NOTES 166<a name="NOTES"></a> 167</h2> 168 169 170<p style="margin-left:11%; margin-top: 1em">See 171<i>http://mos.kaist.edu/guide/walkthrough/05_configuration.html</i> 172to view example startup mOS configuration file.</p> 173 174<h2>AUTHORS 175<a name="AUTHORS"></a> 176</h2> 177 178 179<p style="margin-left:11%; margin-top: 1em">mOS development 180team <[email protected]></p> 181 182<h2>SEE ALSO 183<a name="SEE ALSO"></a> 184</h2> 185 186 187 188<p style="margin-left:11%; margin-top: 1em"><b>mtcp_setconf</b>()</p> 189 190<h2>COLOPHON 191<a name="COLOPHON"></a> 192</h2> 193 194 195<p style="margin-left:11%; margin-top: 1em">This page is 196part of mOS release 0.3 <i>docs</i> section. A description 197of the project, and information about reporting bugs, can be 198found at http://mos.kaist.edu/.</p> 199<hr> 200</body> 201</html> 202