1<!-- Creator     : groff version 1.22.2 -->
2<!-- CreationDate: Fri Feb  3 21:10:01 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_set_uctx</title>
17
18</head>
19<body>
20
21<h1 align="center">mtcp_set_uctx</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="#AUTHORS">AUTHORS</a><br>
27<a href="#SEE ALSO">SEE ALSO</a><br>
28<a href="#COLOPHON">COLOPHON</a><br>
29
30<hr>
31
32
33<h2>NAME
34<a name="NAME"></a>
35</h2>
36
37
38<p style="margin-left:11%; margin-top: 1em">mtcp_set_uctx
39&minus; set private per-flow user-context data</p>
40
41<h2>SYNOPSIS
42<a name="SYNOPSIS"></a>
43</h2>
44
45
46<p style="margin-left:11%; margin-top: 1em"><b>#include
47&lt;mos_api.h&gt;</b></p>
48
49<p style="margin-left:11%; margin-top: 1em"><b>int
50mtcp_set_uctx(mctx_t</b> <i>mctx</i><b>, int</b>
51<i>sockid</i><b>, void *</b><i>uctx</i><b>);</b></p>
52
53<h2>DESCRIPTION
54<a name="DESCRIPTION"></a>
55</h2>
56
57
58
59<p style="margin-left:11%; margin-top: 1em"><b>mtcp_set_uctx</b>()
60can be used to associate flow-specific monitoring data to a
61flow record in the application layer. The flow-specific data
62is stored with the socket that can referred to by the
63<i>sockid</i> argument. The private data can be stored as a
64void *. It is the responsibility of the user to free up the
65private data (if it is dynamically allocated from memory)
66when the flow record gets deleted from the stack (due to,
67e.g., connection termination).</p>
68
69<p style="margin-left:11%; margin-top: 1em">The
70<b>mtcp_set_uctx</b>() call takes an additional argument
71named <i>mctx</i> that represents the per-core mTCP context
72in an application (see <b>mtcp_create_context()</b> for
73details).</p>
74
75<h2>AUTHORS
76<a name="AUTHORS"></a>
77</h2>
78
79
80<p style="margin-left:11%; margin-top: 1em">mOS development
81team &lt;[email protected]&gt;</p>
82
83<h2>SEE ALSO
84<a name="SEE ALSO"></a>
85</h2>
86
87
88
89<p style="margin-left:11%; margin-top: 1em"><b>mtcp_socket</b>(),
90<b>mtcp_get_uctx</b>(),</p>
91
92<h2>COLOPHON
93<a name="COLOPHON"></a>
94</h2>
95
96
97<p style="margin-left:11%; margin-top: 1em">This page is
98part of mOS release 0.3 <i>docs</i> section. A description
99of the project, and information about reporting bugs, can be
100found at http://mos.kaist.edu/.</p>
101<hr>
102</body>
103</html>
104