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<link rel="stylesheet" href="./common.css"> 18</head> 19<body> 20<div class="main"> 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<hr> 33--> 34 35<h2>NAME 36<a name="NAME"></a> 37</h2> 38 39 40<p style="margin-left:11%; margin-top: 1em">mtcp_getconf 41− retrieve the running configuration of mOS 42application</p> 43 44<h2>SYNOPSIS 45<a name="SYNOPSIS"></a> 46</h2> 47 48 49<p style="margin-left:11%; margin-top: 1em"><b>#include 50<mtcp_api.h></b></p> 51 52<p style="margin-left:11%; margin-top: 1em"><b>int 53mtcp_getconf(struct mtcp_conf *</b><i>conf</i><b>);</b></p> 54 55<h2>DESCRIPTION 56<a name="DESCRIPTION"></a> 57</h2> 58 59 60 61<p style="margin-left:11%; margin-top: 1em"><b>mtcp_getconf</b>() 62call is used to fetch the current running configuration of 63the mOS core. The <i>conf</i> argument is a pointer to a 64user-allocated <i>struct mtcp_conf</i> that contains a 65number of fields including:</p> 66 67<table width="100%" border="0" rules="none" frame="void" 68 cellspacing="0" cellpadding="0"> 69<tr valign="top" align="left"> 70<td width="11%"></td> 71<td width="23%"> 72 73 74<p><i>num_cores</i></p></td> 75<td width="8%"></td> 76<td width="58%"> 77 78 79<p>An integer that shows the total number of cores the mOS 80core is using.</p></td></tr> 81<tr valign="top" align="left"> 82<td width="11%"></td> 83<td width="23%"> 84 85 86<p><i>max_concurrency</i></p></td> 87<td width="8%"></td> 88<td width="58%"> 89 90 91<p>An integer that holds how many ongoing flows each core 92thread manages concurrently. Default value is 100000.</p></td></tr> 93<tr valign="top" align="left"> 94<td width="11%"></td> 95<td width="23%"> 96 97 98<p><i>max_num_buffers</i></p></td> 99<td width="8%"></td> 100<td width="58%"> 101 102 103<p>An integer that holds the maximum number of socket 104buffers each core thread can hold. Default value is 105100000.</p> </td></tr> 106<tr valign="top" align="left"> 107<td width="11%"></td> 108<td width="23%"> 109 110 111<p><i>rcvbuf_size</i></p></td> 112<td width="8%"></td> 113<td width="58%"> 114 115 116<p>An integer that holds the size of the TCP receive 117buffer. Default value is 8KB.</p></td></tr> 118<tr valign="top" align="left"> 119<td width="11%"></td> 120<td width="23%"> 121 122 123<p><i>tcp_timeout</i></p></td> 124<td width="8%"></td> 125<td width="58%"> 126 127 128<p>An integer that holds the idle flow expiry timeout of 129the monitoring flow. Default value is 30 secs.</p></td></tr> 130</table> 131 132<h2>RETURN VALUE 133<a name="RETURN VALUE"></a> 134</h2> 135 136 137<p style="margin-left:11%; margin-top: 1em">Returns 0 on 138success; -1 on failure and <i>errno</i> is set 139appropriately.</p> 140 141<h2>ERRORS 142<a name="ERRORS"></a> 143</h2> 144 145 146<table width="100%" border="0" rules="none" frame="void" 147 cellspacing="0" cellpadding="0"> 148<tr valign="top" align="left"> 149<td width="11%"></td> 150<td width="9%"> 151 152 153<p style="margin-top: 1em"><b>EINVAL</b></p></td> 154<td width="6%"></td> 155<td width="40%"> 156 157 158<p style="margin-top: 1em">The <i>conf</i> argument is 159NULL.</p> </td> 160<td width="34%"> 161</td></tr> 162</table> 163 164<h2>NOTES 165<a name="NOTES"></a> 166</h2> 167 168 169<p style="margin-left:11%; margin-top: 1em">See 170<i>http://mos.kaist.edu/guide/walkthrough/05_configuration.html</i> 171to view example startup mOS configuration file.</p> 172 173<h2>AUTHORS 174<a name="AUTHORS"></a> 175</h2> 176 177 178<p style="margin-left:11%; margin-top: 1em">mOS development 179team <[email protected]></p> 180 181<!-----------------------------------------------------------> 182<h2>EXAMPLES 183<a name="EXAMPLES"></a> 184</h2> 185 186<p style="margin-left:11%; margin-top: 1em"> 187 <a href="http://mos.kaist.edu/guide/programmer/05_api_example.html#global-initialization-routine"> 188 http://mos.kaist.edu/guide/programmer/05_api_example.html#global-initialization-routine 189 </a> 190</p> 191<!-----------------------------------------------------------> 192 193<h2>SEE ALSO 194<a name="SEE ALSO"></a> 195</h2> 196 197 198 199<p style="margin-left:11%; margin-top: 1em"><b>mtcp_setconf</b>()</p> 200 201<h2>COLOPHON 202<a name="COLOPHON"></a> 203</h2> 204 205 206<p style="margin-left:11%; margin-top: 1em">This page is 207part of mOS release 0.3 <i>docs</i> section. A description 208of the project, and information about reporting bugs, can be 209found at http://mos.kaist.edu/.</p> 210<!-- <hr> --> 211<br> 212<div class="footer"> 213 <img src="back-arrow.jpg" width="2%" height="2%"><a href="http://mos.kaist.edu/index_man.html">Back to Index</a> 214</div> 215</div> 216</body> 217</html> 218